ποΈ Menus
Every menu is a file in menus/. They all share one more file, menus/templates.yml, which holds
the shapes they cut their items from.
| File | Opens as |
|---|---|
main.yml | /chat |
color_type.yml | Which palette to use |
color_legacy.yml Β· color_hex.yml Β· color_gradient.yml Β· color_animate.yml | The palettes |
history_nick.yml Β· history_color.yml | What they wore before |
blocklist.yml | Who they blocked |
templates.yml | Nothing. The shapes the others use |
The shape of a menu file
title: '<dark_gray><b>α΄α΄Κα΄Κα΄Ιͺα΄
α΄Κα΄α΄'
size: 54 # 9, 18, 27, 36, 45 or 54
default_template: swatch # what a button falls back to
dynamic:
slots: [10-16, 19-25, 28-34] # where paged content goes
filler:
template: filler # the backdrop
buttons:
back:
template: back
slot: 45
slot: -1 hides a button without deleting it.
Templates
A back arrow, a locked button, a colour swatch β each is written once in templates.yml, and a
menu that wants one names it instead of repeating it.
back:
template: back # take the shape
slot: 45 # and add what only this menu knows
A menu whose buttons mostly share a shape says so once at the top with default_template, and a
button that must escape it says template: none.
What wins
The menu always wins over the template, field by field and state by state. A menu that likes the swatch template but wants a different locked material writes only that:
ocean:
hex: '#289bd0'
states:
locked:
material: BARRIER
Everything it does not mention β the other states, their lore, their flags β stays as written in the template.
The shapes that ship
| Template | For |
|---|---|
filler | The backdrop |
arrow Β· back Β· prev_page Β· next_page Β· close | Navigation |
button | A plain clickable button |
swatch | One colour in a palette β all four palettes use it |
custom | The field where a player types their own colour |
toggle | A format that is on or off |
reset | Putting something back the way it was |
filter | Which entries a palette shows |
slot | One row of a saved list |
Restyle one and every menu using it changes at the same moment. That is the whole point.
{NAME}
A template writes {NAME} where the item's own name goes, so a button names itself once and
still reads red while locked and green while on. This is a whole button:
bold:
template: toggle
material: IRON_INGOT
name: '<b>Κα΄Κα΄
'
slot: 47
extends
A template may build on another, which is how the three arrows share one material and one set of flags.
A menu's own templates
A menu may declare a templates: block of its own, laid over the shared ones. Use it to restyle a
shared shape for one menu, or to add a shape only that menu needs.
States
The plugin decides which state an item is in and the menu draws that one. The names are read by the code, so renaming one turns it off. A state the plugin never asks for is never drawn.
| State | Meaning |
|---|---|
unlocked / locked | May use it / needs a permission |
selected | This is the one they are wearing |
active / inactive | There is something to reset / there is not |
on_cooldown | Has to wait |
available | An empty slot they own |
all / no_permission | Filter states |
Items
material takes more than a vanilla name:
| Written as | Resolves to |
|---|---|
DIAMOND | A vanilla material |
nexo:my_item | A Nexo item β nexo-my_item works too |
itemmodel:minecraft:trophy | An item_model component, 1.21.4+ |
Items from MythicMobs, ItemsAdder, Oraxen, HeadDatabase, MMOItems and others resolve the same way β the full list is in For developers.
Beyond material and name, an item takes lore, amount, glow, model, item_flags,
color, enchantments, banner_patterns, potion_effects, trim_material / trim_pattern,
tooltip_style and hide_tooltip.
hide_tooltip: trueshows no tooltip at all, rather than an empty one β a blank name is not the same as no name. Needs 1.20.5 or newer.
Slots
slot: 5
slots: [1, 2, 3, 5]
slots: [1-3, 5]
Counting starts at 0, left to right, top to bottom. In a 54-slot menu the last row is 45β53.
Sounds
One click for the whole plugin, in config.yml under menus.sounds. The shared click is written
once under states.defaults and each state moves only what it needs β locked a dull note,
selected the ding of picking something up. A sound that is empty or none is silence, which is
what a button that does nothing should be.
Two other ways the menu opens
As a dialog. menus.prefer_dialog opens /chat as a dialog window where the server version
has them. The wording is in the language file under dialog.
As a Bedrock form. menus.bedrock_forms shows Bedrock players a native form instead. Needs
Floodgate; Java players are never affected. Its wording is under form, and menus.form_icons
sets each button's icon.
Neither reads menus/, so a menu you restyle there is the Java-inventory one.