menus
The GUI files in guis/ - layout, slots, temporary icons, item fields and every action.
Every menu except the case menu is a file in guis/. Retheme any of them freely: titles, sizes,
materials, names, lore and slots. After editing, run /cosmeticsadmin reload. A file you delete
from guis/ is restored with its defaults on the next load.
| File | Menu |
|---|---|
cosmetics-menu.yml |
/cosmetics, the paged cosmetic list. |
equip-menu.yml |
Equip, unequip or sell one cosmetic. |
cosmetics-market.yml |
/cosmetics market, the paged listing list. |
market-confirm.yml |
Confirm a market purchase. |
case-confirm.yml |
Confirm a case opening. |
The case menu itself (the one a case block opens) lives in each case file’s
Gui block.
How a menu file works
Section titled “How a menu file works”The root holds Title, Size (a multiple of 9), an Items section, and depending on the menu a
slot key and a Temporary-Icons section.
Title: "&8Cosmetics"Size: 54Cosmetic-Slots: [10-16, 19-25, 28-34, 37-43]
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-9, 17-18, 26-27, 35-36, 44, 47, 51, 52]
Next-Item: Material: ARROW Slot: 50 Name: "&a&lNext Page ->" Lore: - "&7Click to view next page" Actions: - "[next]"- Each entry in
Itemsis placed withSlot:(one number) orSlots:(a list of numbers and inclusivea-branges). Every slot must be insideSize, or the file fails to load. - An entry without
Actionsis decoration. An entry withActionsis a button. Menus dispatch on the action, not on the entry’s key, so keys likeNext-Itemare free names: rename and move buttons as you like. - When two entries share a slot, the one with fewer slots wins. A full-size filler never covers a button.
- The title is resolved once when the menu opens, so it does not take page tokens.
Slot keys
Section titled “Slot keys”| Key | File | Description |
|---|---|---|
Cosmetic-Slots |
cosmetics-menu.yml |
Where cosmetic icons go, in order. One page is as many cosmetics as there are slots. |
Listing-Slots |
cosmetics-market.yml |
Where listings go, in order. |
Preview-Slot |
equip-menu.yml |
The cosmetic’s icon. Defaults to 0 when missing. |
Preview-Slot |
market-confirm.yml, case-confirm.yml |
The listing (or case Open-Item) preview. No preview when missing. |
Temporary icons
Section titled “Temporary icons”Temporary-Icons are flashed into a clicked slot for two seconds when a click is refused, then the
real item comes back. While a slot is flashing, clicks on it are ignored. Each is a standard
item; remove one to refuse that click without a flash.
| Icon | File | Flashed when |
|---|---|---|
No-Previous-Page |
cosmetics menu, market | Turning back on the first page (plays NO-PAGE-FOUND). |
No-Next-Page |
cosmetics menu, market | Turning forward on the last page (plays NO-PAGE-FOUND). |
Locked |
cosmetics menu | Clicking a cosmetic you do not own. |
Already-Owned |
market | Clicking a listing of a cosmetic you own, or have listed yourself. |
Insufficient-Funds |
market | Clicking a listing you cannot afford, or while the economy is unavailable. |
Temporary-Icons: Locked: Material: BARRIER Name: "&c&lError!" Lore: - "&7You do not own this cosmetic yet!"Item fields
Section titled “Item fields”The same item format is used by menu items, temporary icons, the voucher template, case
Place-Item, Animation.Head and case Gui items.
| Field | Default | Description |
|---|---|---|
Material |
required | Any material name, modern or legacy (resolved through XSeries). |
Amount |
1 |
Stack size. |
Name |
none | Display name. |
Lore |
[] |
Lore lines. |
Base64 |
none | Head texture for PLAYER_HEAD. "{player}" shows the viewer’s own head. |
Custom-Model-Data |
none | Custom model data for resource packs. |
Item-Model |
none | Item model key for resource packs. |
Glow |
false |
Adds an enchant glint. |
Item-Flags |
[] |
Bukkit item flags, for example HIDE_ATTRIBUTES. |
Enchantments |
none | Real enchantments, if you want them. |
Unbreakable, Hide-Tooltip, Damage |
none | Further item properties. |
Paged menu tokens
Section titled “Paged menu tokens”cosmetics-menu.yml and cosmetics-market.yml are paged menus. Every item in them gets:
| Token | Value |
|---|---|
{page} |
Current page. |
{pages} / {max-page} |
Number of pages. |
{results} |
Number of entries across all pages. |
{category} |
The current filter. |
{sort} |
The current sort (cosmetics menu). |
{sort-market} |
The current sort (market). |
The filter and sort buttons also expand {print-categories}, {print-sort-types} (cosmetics menu)
and {print-sort-types-market} (market) into one line per option, styled by
Filter-Item / Sort-Item / Sort-Item-Market
in config.yml. The cosmetic icons and listing icons are built from config.yml
(Lore-Addons,
Market-Listing-Lore), not from these
files.
Actions
Section titled “Actions”Plugin actions, by menu:
| Action | Menu | Does |
|---|---|---|
[cycle-filter] / [filter] |
cosmetics menu, market | Next filter on left click, previous on right click. Clears a market search. |
[cycle-sort] / [sort] |
cosmetics menu, market | Next sort on left click, previous on right click. |
[previous] / [previous-page] |
cosmetics menu, market | Previous page. |
[next] / [next-page] |
cosmetics menu, market | Next page. |
[open-market] / [market] |
cosmetics menu | Open the market; closing it returns to the cosmetics menu. |
[search] |
market | Close the menu and ask for a search in chat. |
[my-listings] |
market | Show only your listings. The item is only shown while viewing everyone’s. |
[all-listings] |
market | Back to everyone’s listings. The item is only shown while viewing your own. |
[equip] |
equip menu | Equip. The item is only shown while the cosmetic is unequipped. |
[unequip] |
equip menu | Unequip. The item is only shown while the cosmetic is equipped. |
[toggle] |
equip menu | Equip or unequip, always shown. |
[sell] / [sell-cosmetic] |
equip menu | Close the menu and ask for a sell price in chat. |
[confirm] / [confirm-purchase] / [buy] |
both confirm menus | Buy the listing, or open the case. Runs once. |
[cancel] / [cancel-purchase] |
both confirm menus | Go back to the market, or the case menu. |
[my-listings] and [all-listings] can share a slot (the shipped market puts both at slot 52), and
so can [equip] and [unequip] (slot 16 in the shipped equip menu).
Generic actions, available on any item in any of these menus:
| Action | Does |
|---|---|
[open-cosmetics] / [cosmetics] |
Open the cosmetics menu. |
[open-market] / [market] |
Open the market. |
[command] / [console] <cmd> |
Run a command as the console. |
[player] <cmd> |
Run a command as the player. |
[message] <text> |
Send the player a message. |
[broadcast] <text> |
Send everyone a message. |
[actionbar] <text> |
Show an action bar. |
[title] title;subtitle;in;stay;out |
Show a title. |
[sound] <sound> |
Play a sound. |
[close] |
Close the menu for good. |
[back] |
Go back to the previous menu. |
Arguments get {player}, {uuid}, the menu’s tokens and, with PlaceholderAPI, %...%. An item may
list several actions; they run in order. Any other action, and a line without a [type], does
nothing.
Navigation
Section titled “Navigation”Every menu opens with the MENU-OPEN sound (MARKET-OPEN for the market), including when a player
comes back to it.
- Closing the equip menu with ESC reopens the cosmetics menu.
- Closing a market opened from the cosmetics menu reopens the cosmetics menu.
- Closing the purchase confirm menu (ESC or
[cancel]) reopens the market. - Closing the case confirm menu (ESC or
[cancel]) reopens the case menu. [sell],[search]and[close]close without returning.
Filter, sort, page, [open-market], [search] and listing-view clicks within 150 ms of the previous
one are ignored, so a double click never skips two steps.
The files
Section titled “The files”cosmetics-menu.yml
Section titled “cosmetics-menu.yml”Title, Size: 54, Cosmetic-Slots: [10-16, 19-25, 28-34, 37-43]. Ships a filter (slot 45), sort
(46), previous (48), page indicator (49), next (50) and View Market (53). Temporary icons:
No-Previous-Page, No-Next-Page, Locked. Clicking an owned cosmetic opens the equip menu.
equip-menu.yml
Section titled “equip-menu.yml”Size: 27, Preview-Slot: 13. Ships Sell Cosmetic (slot 10, [sell]) and the
Equipped / Unequipped toggle pair (slot 16). Items here take no plugin tokens.
cosmetics-market.yml
Section titled “cosmetics-market.yml”Size: 54, Listing-Slots: [10-16, 19-25, 28-34, 37-43]. Ships filter (45), sort (46), previous
(48), page indicator (49), next (50), My Listings / View All Listings (52) and Search
(53). Temporary icons: No-Previous-Page, No-Next-Page, Insufficient-Funds, Already-Owned.
market-confirm.yml
Section titled “market-confirm.yml”Size: 9, Preview-Slot: 4 (the listing with its Buyable lore). Ships Confirm (slots 0-3)
and Cancel (5-8). Only used when Market.Confirm-Purchase is true.
case-confirm.yml
Section titled “case-confirm.yml”Size: 9, Preview-Slot: 4 (the case’s Open-Item). Ships Confirm (slots 0-3) and Cancel
(5-8).
