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
| Option | What it does |
|---|---|
title | Chest title |
rows | 1 to 6 rows of 9 slots; slot 0 is top left (default 3) |
permission | Only players with this permission can open the menu; empty for everyone |
items | Buttons: slot or slots, item (such as minecraft:compass), name, lore (a list of lines), glow, permission, and click actions |
list.slots, list.entries | Entries (buttons without slots) fill these slots in order; more entries make more pages |
list.source, list.entry | Entries 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} |
pin | On 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,#rrggbband MiniMessage tags, or a key from the language files.{player}is the player's name,{page}and{pages}the page. - A button without a
nameis 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:
| Action | Does |
|---|---|
[player] command | Runs the command as the player, with their permissions |
[console] command | Runs the command as the server |
[message] text | Sends the player a message |
[menu] name | Opens 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
| Source | Values |
|---|---|
warps | {name}, {world}, {x}, {y}, {z}, {price} |
homes | {name}, {world}, {x}, {y}, {z}, {price} |
pwarps | See Player warps |