Skip to main content

Menu files

Each file config/britaessentials/menus/<name>.json is a chest menu, opened with /menu <name> (names use a-z, 0-9, - and _). On the first start the mod writes two examples, example and tips; it never writes them again once the folder exists. The warps, homes and player warps menus use the same format.

After changing a file run /brita reload. Mistakes (a slot outside the menu, an unknown item or action) are reported in the server log; the rest of the menu still works.

A small menu​

{
"title": "&6Server menu",
"rows": 3,
"items": [
{"slot": 11, "item": "minecraft:compass", "name": "&eSpawn", "lore": ["Back to the start"],
"click": ["[player] spawn", "[close]"]},
{"slot": 15, "item": "minecraft:ender_pearl", "name": "&bWarps", "click": ["[menu] warps"]},
{"slots": [0, 8, 18, 26], "item": "minecraft:orange_stained_glass_pane"}
]
}

Options​

OptionWhat it does
titleChest title
rows1 to 6 rows of 9 slots; slot 0 is top left (default 3)
permissionOnly players with this permission can open the menu; empty for everyone
itemsButtons: slot or slots, item (such as minecraft:compass), name, lore (a list of lines), glow, permission, and click actions
list.slots, list.entriesEntries (buttons without slots) fill these slots in order; more entries make more pages
list.source, list.entryEntries that a module offers (warps, homes, pwarps), after the file's own entries; list.entry is their look (name, lore, clicks; without item the module's icon). Names and lore may use the module's values, actions only {id} and {player}
pinOn a button: shows that entry of the source in the button's slots, with the button's look and the entry's values; the list leaves it out. Hidden while the entry does not exist
  • Texts (title, name, lore, [message]) are your own text with & codes, #rrggbb and MiniMessage tags, or a key from the language files. {player} is the player's name, {page} and {pages} the page.
  • A button without a name is a frame piece without a tooltip.
  • When several buttons name the same slot, the first one the player may see wins. List entries come before all buttons, so a button on a list slot fills it only where the list has no entry.

Clicks and actions​

click (any click) or left, right, shiftLeft, shiftRight, each a list of actions done in order:

ActionDoes
[player] commandRuns the command as the player, with their permissions
[console] commandRuns the command as the server
[message] textSends the player a message
[menu] nameOpens another menu
[close]Closes the menu
[back]Opens the menu before, or closes
[next], [previous]Turns the page of the list
  • Commands may use {player}.
  • Buttons with [next] or [previous] only show when there is such a page.

Permissions​

A permission written in a menu file is checked by LuckPerms. When LuckPerms does not set it (or is not installed), only operators have it.

Values of module lists​

SourceValues
warps{name}, {world}, {x}, {y}, {z}, {price}
homes{name}, {world}, {x}, {y}, {z}, {price}
pwarpsSee Player warps