Menus
Every in-game menu is fully editable. On first start PhantomBans creates a plugins/PhantomBans/menus/
folder with one file per menu, so you can restyle any button, move it, reskin it with a resource pack,
or lay out your own filler design.
For how the menus are used in-game, see In-Game Menus.
The files
| File | Menu |
|---|---|
common.yml | Shared chrome used by every menu: border filler, brand banner, target head, close button, and the previous / page / next controls for list menus. |
punish.yml | The /punish menu. |
history.yml | A player’s punishment history. |
staffhistory.yml | Punishments issued by a staff member. |
lookup.yml | The /lookup summary. |
reports.yml | The report queue. |
appeals.yml | The appeal queue. |
staffnotes.yml | The staff notes menu. |
duration.yml | The temp-ban / temp-mute duration picker. |
reason.yml | The reason picker (fed by preset-reasons in config.yml). |
template.yml | The punishment-template ladder picker. |
confirmation.yml | The confirm / cancel prompt. |
Because the shared chrome lives in common.yml, editing the border, brand banner, close button, or page
controls there changes every menu at once.
Item keys
Every item in every menu accepts the same keys:
| Key | Meaning |
|---|---|
material | Bukkit material name, for example DIAMOND_SWORD or PLAYER_HEAD. Defaults to STONE. |
name | MiniMessage display name. |
lore | A list of MiniMessage lines. |
glow | true to add an enchant shimmer. |
amount | Stack size (default 1). |
custom-model-data | A resource-pack model id. 0 or absent means none. |
slot | The inventory slot (0-53). |
slots | A list of slots, for items that fill several (fillers, reason and template grids). |
close:
slot: 8
material: BARRIER
custom-model-data: 0
glow: true
name: '<red><bold>Close</bold></red>'
lore:
- '<gray>Close this menu.</gray>'Menu titles and row counts are configurable too, at the top of each file:
title: '<gradient:#9B30FF:#FF3A6E>Punish » {player}</gradient>'
rows: 6Colours and gradients render exactly as you write them. The default menu italic is suppressed, so a
gradient set at the start of a name or lore line carries through the whole line. An explicit
<italic> still works.
Filler designs
Each menu file has a fillers: block. Add as many named entries as you like, each with its own material,
to build layered pane designs:
fillers:
border:
material: BLACK_STAINED_GLASS_PANE
slots: border # the outer edge
accent:
material: PURPLE_STAINED_GLASS_PANE
slots: [3, 5] # explicit slotsslots takes one of:
border- the outer edge of the menufill- every slot- a list like
[3, 5, 21]- exactly those slots
Fillers are painted first, so your buttons always sit on top. Remove the fillers: block from a menu to
fall back to the single border pane defined in common.yml.
Dynamic items
Some menus build their items from live data. Those still take all the keys above, plus a little extra:
-
History rows (
history.yml,staffhistory.yml) pick their material from amaterials:map by punishment type, with adefault:entry: materials: BAN: BARRIER MUTE: PAPER KICK: LEATHER_BOOTS WARN: ORANGE_DYE default: BOOK name: '<color:#9B30FF><bold>#{id} {type}</bold></color>' removed-line: '<red>Removed by {removed_by} on {removed_at}</red>' evidence-line: '<color:#1AFFB2>Evidence: {evidence_url}</color>'The
{removed}and{evidence}lore lines only appear when they apply. -
Risk tiles (
lookup.yml,punish.yml) pick their material from amaterials:map by score tier:low,medium,high,critical. -
Duration buttons (
duration.yml) are abuttons:map where each entry has aslotand aduration(parsed, and available as{duration}in the lore). Add, remove, or reorder them freely. -
Reason and template grids (
reason.yml,template.yml) use a top-levelslots:list for where the entries are placed.
Placeholders
Names and lore accept placeholders in curly braces. The useful ones per menu:
| Menu | Placeholders |
|---|---|
| Any player menu title | {player} |
common.yml target head | {name}, {uuid} |
| Pagination | {page}, {pages}, {total} |
punish.yml | {ip} (ip ban), {warnings}, {alts}, {score}, {level} (risk) |
history / staffhistory entry | {id}, {type}, {status}, {reason}, {staff}, {target}, {date}, {duration}, {expiry}, {server} |
lookup.yml | {first_seen}, {last_seen}, {play_time}, {ip}, {country}, {proxy}, {score}, {level}, {value} (stat tiles) |
reports.yml | {id}, {target}, {reporter}, {reason}, {submitted} |
appeals.yml | {id}, {player}, {punishment}, {message}, {submitted} |
staffnotes.yml | {id}, {note}, {author}, {date} |
Apply your changes
After editing any menu file, run:
/phantombans reloadA slot outside the menu is skipped with a console warning instead of breaking the menu, so a typo is
safe. If you set a material that does not exist, the item falls back to STONE with a warning.
The menu-version line in each file is managed by the plugin. Do not edit it.