menus
The crates-menu.yml and open-menu.yml layouts - item format, slot syntax, states and every action.
The player menus live in guis/:
guis/crates-menu.yml- the/cratesmenu.guis/open-menu.yml- the redeem menu shown when a player left-clicks aROLLcrate.
You can retheme both freely. After editing, run /cratesadmin reload. Preview menus have their own
folder, see previews, and the editor menus are on the
editor menus page.
How the files work
Section titled “How the files work”The root holds Title, Size (a multiple of 9) and an Items section. Every entry in Items is
one item. Its key is its id, which only matters where noted below.
- Slots use either
Slot:(a single number) orSlots:(a list where each entry is a number or ana-binclusive range). Every slot must be insideSize. - Items are painted broadest first, and the item with the fewest slots wins a contested slot, so a full-size filler never covers a button.
- An item may carry an
Actions:list of"[type] argument"lines, run in order on click. An item without actions, or withActions: [], does nothing when clicked. - Item fields are the standard set:
Material,Name,Lore,Amount,Base64,Custom-Model-Data,Glow,Item-Flagsand so on. See item fields.
crates-menu.yml
Section titled “crates-menu.yml”Title: "Server Crates"Size: 36
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-35]
Barrier-Item: Material: GLASS_PANE Name: "&r" Slots: [10-16, 19-25]
Animations-Item: Slot: 31 States: Enabled: Material: GLOW_ITEM_FRAME Name: "&a&lAnimations Toggle" Lore: - "&7Toggle if an animation should play" - "&7when opening any of your crates." - "" - "&a&lENABLED" - "" - "&e➥ Click to disable!" Disabled: Material: ITEM_FRAME Name: "&c&lAnimations Toggle" Lore: - "&7Toggle if an animation should play" - "&7when opening any of your crates." - "" - "&c&lDISABLED" - "" - "&e➥ Click to enable!" Actions: - "[animations]"Crate positions are not in this file. Each crate puts its icon at its own Display-Item.Slot
from its crate file, drawn on top of the layout. This
file only describes the frame around them. Left click on a crate opens it, right click previews it.
Animations-Item is optional. Keep that exact id: instead of its own material it has a States
block, and the menu shows Enabled or Disabled depending on the player’s animation setting.
Clicking it runs [animations], which flips the setting and saves it.
Tokens in this file: {player}.
open-menu.yml
Section titled “open-menu.yml”Title: "Redeem {crate} Keys"Size: 27
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-26]
Open-One-Item: Material: HOPPER Slot: 12 Name: "&b&lOpen One Key" Lore: - "&7Open a single crate key and take" - "&7one key from your balance." - "" - "&bInformation:" - "&3 - &7Crate: &f{crate}" - "&3 - &7Balance: &f{keys} Keys" - "" - "&e➥ Click to open!" Actions: - "[open-one]"
Open-All-Item: Material: CHEST_MINECART Slot: 14 Name: "&a&lOpen All Keys" Lore: - "&7Instantly open every crate key" - "&7and set your balance to zero." - "" - "&aInformation:" - "&2 - &7Crate: &f{crate}" - "&2 - &7Balance: &f{keys} Keys" - "" - "&e➥ Click to open all!" Actions: - "[open-all]"The redeem menu opens on every left click of a ROLL crate in /crates, even with one key.
Pressing Escape returns to the crates menu.
Open-All-Itemis required by that exact id. Its stack size shows the player’s key balance, and it is hidden when the crate hasMass-Open-Enabled: false. The menu fails to load without it.Open-One-Itemis an ordinary button; any item with[open-one]works.
Tokens in this file (title included): {crate}, {keys} (the player’s keys), {rewards},
{player}.
Actions
Section titled “Actions”| Action | Where | Does |
|---|---|---|
[open-one] |
open menu | Opens one key of the crate. |
[open-all] |
open menu | Opens the player’s whole balance at once (instant, no animation). Does nothing when mass opens are off. |
[animations] |
any menu | Toggles the player’s animation setting. |
[crates] |
any menu | Opens the crates menu. |
[previous] / [next] |
paged menus | Turn the page (also [previous-page] / [next-page]). |
[console] <cmd> |
any menu | Runs a command from console. |
[player] <cmd> / [command] <cmd> |
any menu | Runs a command as the player. |
[message] <text> |
any menu | Sends a chat message. |
[broadcast] <text> |
any menu | Sends a message to everyone. |
[actionbar] <text> |
any menu | Shows an action bar message. |
[title] <title>;<subtitle>;<in>;<stay>;<out> |
any menu | Shows a title. Times are in ticks. |
[sound] <NAME;volume;pitch> |
any menu | Plays a sound. |
[back] |
any menu | Goes back to the previous menu. |
[close] |
any menu | Closes the menu. |
{player}, {uuid} and, with PlaceholderAPI installed, %...% are resolved in action arguments.
Sounds
Section titled “Sounds”The sounds these menus play (open, toggle, not enough keys) are set in config.yml, not in the menu files.
