Crates
The crate list, a crate's overview and its five sections, placing crates with the wand, the floating icon, the hologram and the idle loop.
A crate is a row in the database with an id, a display name, an icon, a list of opening costs, its
rewards, a guarantee, an animation and an audience. It is built and edited from /cratesadmin — also
/cratesa — and placed on blocks with a wand. There is no file to write a crate in.
The crate list
/cratesadmin opens Crates: one item per crate, sorted by id, with its animation, reward count, the
blocks it stands on and its state.
| Click on a crate | Does |
|---|---|
| Left | Opens its overview. |
| Shift + left | Hands you its wand. |
| Right | Deletes it, after a confirmation. |
The bottom row holds Create crate, Server history (the latest openings of every crate, see Openings), Keys (see Keys and costs) and, in the corner, Settings.
Settings
Settings opens ExyliaLib's settings screens for this plugin: config.yml, tiers.yml and every
animations/<id>.yml, key by key, without editing the files. Back returns to the crate list. It needs
exyliacrates.admin (or ExyliaLib's exylialib.config). The same files are also offered in ExyliaLib's
browser editor, /exylialib editor ExyliaCrates, and an edit applied from there runs the crates step of a
reload. See Web editor.
Creating a crate
Create crate asks for an id: lowercase letters, numbers, - and _, up to 64 characters; spaces become
underscores. The new crate starts with:
| Field | Starts as |
|---|---|
| Display name | {primary}&l and the id in capitals |
| Icon | ENDER_CHEST |
| Cost | One key of the same id. A key with that id is created with the crate when there is none. |
| Rewards | None. A crate without rewards answers "This crate has no rewards yet." |
| Rewards per key | 1 |
| Guarantee | Off |
| Animation | Wheel of Fortune |
| Audience | Everyone, one opening at a time |
| State | Enabled, floating icon shown |
Deleting a crate
Deleting takes the crate off every block it stood on and removes its row. Its keys stay, for other crates to take, and so do players' balances of them and the history.
The overview
A crate's overview shows its state at the top and one button per section underneath. Every change is saved the moment it is made, and every block of the crate is redrawn with it.
| Button | What it holds |
|---|---|
| Status | Enabled or disabled; click to switch. A disabled crate refuses every opening with "This crate is disabled." and draws no floating icon. |
| General | Display name, icon and state. |
| Opening cost | What one opening takes. See Keys and costs. |
| Rewards | The reward editor, rewards per key and the guarantee. See Rewards and rarities. |
| Opening | The animation, a free preview, and who watches. See Openings and Animations. |
| Presence | The wand, the floating icon and the hologram. Below. |
| Player view | The contents screen exactly as a player sees it. |
| Delete crate | Deletes it, after a confirmation. |
General
| Button | Edits |
|---|---|
| Display name | Shown in menus, holograms and chat. Colours and & codes work. |
| Icon | Shown in the crate list, the contents screen and turning over the block. A material, a player head or an item from another plugin. |
| State | The same switch as Status. |
Rewards
| Button | Edits |
|---|---|
| Rewards | Opens the weighted reward editor. |
| Rewards per key | Left-click sets the minimum, right-click the maximum, 1 to 9 each. Each key pays a random number in that range. |
| Guarantee | Left-click sets after how many openings (0 to 500, 0 turns it off), right-click the rarity it guarantees, shift + left-click turns it off. |
Opening
| Button | Edits |
|---|---|
| Animation | Opens the picker: the eleven animations and Instant, the current one marked. Left-click chooses, right-click previews. |
| Preview | Plays the crate's current animation in front of you. No key is spent, nothing is paid, no history is written and no event fires. The prize it lands on is drawn from every reward. |
| Audience | Switches between Everyone, one at a time and Opener only, many at once. See Openings. |
Placing crates
Presence → Crate wand (or shift + left-click on the crate list) hands you the wand for that crate: a
BLAZE_ROD by default (settings.wand-material) carrying the crate's id.
| With the wand | Does |
|---|---|
| Right-click a block | Makes it this crate. "There is already a crate on that block." when one stands there. |
| Left-click a crate block | Removes the crate from it, whichever crate it is. |
Any block works — a chest, an ender chest, a beacon, a slab. The block itself is not changed: it becomes clickable as a crate and is guarded by ExyliaLib's clickable-block module, which keeps players from breaking it and keeps a chest or barrel from opening its own inventory. When the block is a chest, its lid opens at the start of an opening and closes at the end.
The wand only works for holders of exyliacrates.admin. A wand click on a crate block is always a wand
click, never an opening or a preview. One crate can stand on any number of blocks, in any world; each block
is stored with the server it is on.
Right-click opens it with one key; sneak + right-click opens as many as the player can pay for, up to their
multi-open limit (settings.max-multi-open, or their exyliacrates.multiopen.<n>). Left-click opens the
contents screen. Each needs its node (exyliacrates.crate.<id>, exyliacrates.multiopen,
exyliacrates.preview), held by everybody by default. See Openings and
Permissions.
The floating icon
Over every crate block the crate's icon turns slowly and bobs, drawn per player with packets, for players
within idle.radius blocks (24 by default). It is redrawn every idle.interval-seconds (8): one pass of
the loop.
Presence → Floating icon: right-click shows or hides it; left-click opens a form with:
| Field | Meaning |
|---|---|
| Floating icon | Shown or hidden. |
| Offset X, Y, Z | Blocks east, up and south of where idle.height puts it (1.3 above the block). |
| Rotation | The way it faces, in degrees. |
| Spins per cycle | Whole turns it makes per pass of the loop; 0 keeps it still at its rotation. |
Its size and outline are server-wide: idle.scale and idle.glow in config.yml. While an opening plays
on the block, the icon steps aside for everybody watching it.
idle.effects adds effect lines played at every crate once per pass — particles, sounds — for whoever stands
there. Empty by default. Setting idle.interval-seconds to 0 turns the whole loop off, icon included.
The hologram
Above every crate block floats a hologram, by default:
VOTE
▎ Keys » 3
➥ Right click to openIts lines are hologram-lines in lang/<language>/messages.yml. %crate% is the display name and %keys%
the reader's own count of the crate's key — each viewer sees their own number, refreshed every second. It
counts key items carried plus the balance, of the first key the crate's cost names; a crate that takes no key
reads 0.
Presence → Hologram moves it by X, Y and Z blocks from where hologram.offset-y puts it (1.6 above
the block). hologram.enabled: false draws none. While an opening plays on the block, the hologram hides for
everybody watching it.
/cratesadmin reload re-reads messages.yml and config.yml, but holograms already standing keep their
old lines and height. They are redrawn when something in the crate's General, Opening or Presence
section changes, or on the next restart. The same goes for
turning hologram.enabled off.
Something missing on this page? Tell us on Discord