Skip to content

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 /crates menu.
  • guis/open-menu.yml - the redeem menu shown when a player left-clicks a ROLL crate.

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.

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) or Slots: (a list where each entry is a number or an a-b inclusive range). Every slot must be inside Size.
  • 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 with Actions: [], does nothing when clicked.
  • Item fields are the standard set: Material, Name, Lore, Amount, Base64, Custom-Model-Data, Glow, Item-Flags and so on. See item fields.
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}.

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-Item is required by that exact id. Its stack size shows the player’s key balance, and it is hidden when the crate has Mass-Open-Enabled: false. The menu fails to load without it.
  • Open-One-Item is an ordinary button; any item with [open-one] works.

Tokens in this file (title included): {crate}, {keys} (the player’s keys), {rewards}, {player}.

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.

The sounds these menus play (open, toggle, not enough keys) are set in config.yml, not in the menu files.