Menus
Each menu has its own file in plugins/BoxCosmetics/menus/, and common.yml holds what they all share. After you edit one, run /bc reload. Plugin updates keep your values.
A mistake in a menu file is logged with the file and the key, and the menu still opens. The chat and action bar texts are in messages.yml.
The menus
Common changes
These are the changes server owners make most often. Each snippet shows the keys to change, in the file that its first line names. Change those keys in your file, then run /bc reload.
Change an icon
Set the button's item to any vanilla item. glow: true adds the enchantment glint, and glow: false adds none. The full rules are under Icons.
# menus/wardrobe.yml
collection:
item: ENDER_CHEST
glow: true
In game, the Collection button in /bc is an ender chest with the glint.
Use an ItemsAdder or Nexo item as an icon
Write the item plugin's prefix, then the item's id. For ItemsAdder, the id after itemsadder: is the item's namespace:id. The other plugins and their prefixes are under item.
# menus/common.yml
back:
item: nexo:bc_back
# item: itemsadder:myitems:back_arrow # the same with an ItemsAdder item
In game, the Back button of the list menus and of the palette is your Nexo item. So are the Collection's Back button and the showcase page's Wardrobe button, because their own item is "" as shipped. If Nexo or the item is missing, the menu shows the built-in icon.
Move or remove a button
In the menu's layout, give the button another place, or set it to none to leave it out. Places are numbered from 0 at the top left. The full rules are under Layout.
# menus/collection.yml
layout:
back: 45
previous: 48
colors: none # leaves the Colors button out
next: 50
filter: 49 # moves the filter button from 53 to 49
categories: 0-8
cosmetics: 9-44
In game, the Collection has no Colors button, and its filter button is in the middle of the bottom row.
Add your own button that runs a command
Add the button under custom-buttons. In wardrobe.yml, it goes under the look that wardrobe in config.yml picks, which is all as shipped. Every key and every kind of line is under Your own buttons.
# menus/wardrobe.yml
looks:
all:
custom-buttons:
spawn:
slot: 8 # the top right place
item: COMPASS
name: "<gold>Spawn"
lore:
- "<gray>Back to spawn"
left:
- "[player] spawn" # runs /spawn as the player
- "[close]" # closes the menu
In game, a compass named Spawn is at the top right of /bc. A left click runs /spawn as the player and closes the menu.
Give a menu more or fewer rows
Set rows, and set the buttons and the cosmetics to auto so that they move with the rows. Title pictures do not move, so with the Download folder, change the title's <image:...> tags to fit too (Titles). The rows each menu takes are in the table under Layout.
# menus/collection.yml
rows: 5 # the Collection takes 3 to 6
layout:
back: auto # an auto button keeps its column, in the new last row
previous: auto
colors: auto
next: auto
filter: auto
categories: 0-8
cosmetics: auto # every row between the first and the last
In game, the Collection is five rows high, shows 27 cosmetics on each page, and has its buttons in the bottom row.
Change a title or a hint
Titles take & colour codes, and a hint is a list of lines in MiniMessage. With the Download folder, keep the title's <image:...> tags at its start. The full rules are under Titles and Names and lore.
# menus/lists.yml
head:
title: "&8Hats"
place-hint:
- "<yellow>Click:<gray> take the hat off"
In game, the Head list is titled Hats in dark grey, and each hat in it says "Click: take the hat off".
Rules every menu shares
- Icons: The item a button shows, and every form of item id.
- Names, lore and titles: Colours and formatting of names and lore, the placeholders, and menu titles with pictures.
- Layout and your own buttons: Where each slot and button sits, and buttons of your own that run commands.
The menu files
Each menu has its own file in plugins/BoxCosmetics/menus/, and its own page here:
wardrobe.yml
The main menu, /bc: the player's wardrobe, in four looks. wardrobe.yml
lists.yml
The menus of the Head, Wear and Balloon slots, and of their accessory slots. lists.yml
collection.yml
The Collection, where each player keeps cosmetics. collection.yml
colors.yml
The palette of a cosmetic that takes a colour. colors.yml
showcase.yml
The page of /bc showcase, to try cosmetics on. showcase.yml
admin.yml
The admins' page of every cosmetic, /bc cosmetics. admin.yml
common.yml
What every menu shares: Back, the blank slot, the line of a worn item, colours. common.yml
Which menus folder to use
There are two menus folders. The folder the plugin writes on first start has vanilla icons and plain titles, and it works on any server.
The BoxCosmetics folder in the download, called Download on these pages, has icons and title pictures from BoxCosmetics Resource Pack.zip. Most of its icons are pictures from that pack, written pack:boxcosmetics:<name>. Here is its Back button, whose icon is pack:boxcosmetics:back:
# menus/common.yml in the Download folder
back:
item: pack:boxcosmetics:back
glow: false
- With the Download folder, players need the resource pack (add it).
- Without the pack,
pack:icons show as purple and black squares.
From gui.yml
On first start, an old gui.yml is split into the files of menus/, keeping your values. The menu names and lore that were in messages.yml move out of it into menus/ too.
- The old files stay as
gui.yml.oldandmessages.yml.old. If agui.ymlis still there next tomenus/, it is never read. - If the split fails, the menus open as shipped. To try again, fix the problem the console names, delete
menus/, and restart.