Menus
The files in plugins/BoxStand/menus/ hold one menu each, and common.yml holds what all menus share. After you edit one, run /boxstand reload. Chat and action bar texts are in messages.yml.
The menus
Common changes
These are the changes server owners make most often. The first line of each snippet names its file. Change the lines that are already in that file, and add only what the recipe says to add, because a key written twice keeps only its first copy (Updates keep your settings). Then run /boxstand reload.
Change an icon
A button's icon is its item. glow: true adds the enchantment glint, and glow: false leaves the item as it is. In the pose section of stand.yml, change these two lines:
# menus/stand.yml
pose:
item: BLAZE_ROD
glow: true
The player sees a glowing blaze rod as the Pose button. The full rules are in Icons.
Use an ItemsAdder or Nexo item as an icon
Write the plugin's prefix, then the item's id: ia: and the namespace for ItemsAdder, or nexo: for Nexo. Here the Pose button uses the ItemsAdder item pose_icon from the namespace myitems:
# menus/stand.yml
pose:
item: ia:myitems:pose_icon # for a Nexo item, write nexo:pose_icon
The player sees your item as the Pose button. If the plugin or the item is missing, the button shows its built-in item instead. The ids for Oraxen, CraftEngine and MythicCrucible are in Item ids.
Change a title or a hint
A menu's title uses & colour codes, and a button's hint uses MiniMessage. Here the stand menu's title turns gold, and the Pose button gets new lore:
# menus/stand.yml
title: "&6Armor Stand"
pose:
hint: "<yellow>Click:<gray> change the pose"
The player sees a gold "Armor Stand" title, and "Click: change the pose" under the Pose button. In the download's files, the title starts with picture tags. Keep them first and put the colour code after them:
# menus/stand.yml in the download
title: "<image:row_2><image:color_slot><image:color_badge>&6Armor Stand"
The full rules are in Titles and Names and lore.
Move or remove a button
The place of each button is in layout. As shipped, the buttons are auto: they sit side by side in the middle of the buttons places. A place number keeps a button at that place, and none leaves it out. In the layout section of stand.yml, change these three lines:
# menus/stand.yml
layout:
buttons: 9-16 # the row of buttons now ends at place 16
pose: 17 # the Pose button always sits at place 17
gravity: none # no Gravity button
The player sees the Pose button at the right end of row 2, the other buttons centred in places 9 to 16, and no Gravity button. The full rules are in Layout.
Give the stand menu another row
rows sets how many rows a menu has, from 1 to 6. Change the rows line of stand.yml from 2 to 3:
# menus/stand.yml
rows: 3 # row 3 holds places 18 to 26
The player sees a third row of blank slots under the buttons, ready for your own buttons (see the next recipe). The full rules are in Layout.
Add your own button that runs a command
Add a custom-buttons section at the end of the file. Each button gets a name you choose (here spawn), a free place in slot, an icon, and the lines its clicks run. Write each command without the slash. This button sits in the third row from the recipe above:
# menus/stand.yml
rows: 3 # change the rows line, as in the recipe above
custom-buttons: # add this section
spawn:
slot: 22 # the middle of row 3
item: COMPASS
name: "<gold>Spawn"
click: # what every click runs
- "[player] spawn" # runs /spawn as the player
- "[close]" # closes the menu
The player sees a compass named Spawn in the middle of row 3, and a click runs /spawn and closes the menu. To run a command from the server console instead, start its line with [console]. The full rules are in Your own buttons.
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/BoxStand/menus/, and its own page here:
stand.yml
This file holds the stand menu, with its slots and buttons. Its page is stand.yml.
lists.yml
This file holds the menus of the Head, Wear and Balloon slots. Its page is lists.yml.
armor.yml
This file holds the menus of the armour slots, which have two places each and show with BoxCosmetics. Its page is armor.yml.
mannequin.yml
This file holds the mannequin picker. Its page is mannequin.yml.
pose.yml
This file holds the pose page, where the player picks the part to turn. Its page is pose.yml.
reset.yml
This file holds the Reset Pose page. Its page is reset.yml.
common.yml
This file holds what every menu shares: the Back button, the blank slot, the lore line of a worn item, and the pictures and hint of Colors. Its page is common.yml.
Which menus folder to use
There are two menus folders to choose from:
- The folder BoxStand writes on first start has vanilla icons and plain titles.
- The download's
BoxStandfolder ("the download" below) has icons and title pictures fromBoxStand Resource Pack.zip, with the same words. It works with any item plugin or none.
The Back button shows the difference:
# menus/common.yml, as BoxStand writes it
back:
item: ARROW
# menus/common.yml in the download
back:
item: pack:boxstand:mannequin_back
- With the download's files, players need the resource pack (add it). BoxStand never checks that they have it. Without the pack,
pack:icons and title pictures show as squares.
Reload and updates
- Every start and reload brings each file up to date (Updates keep your settings).
- A mistake is logged as
menus/<file>.yml <key>: ..., with what BoxStand does instead, and the menu still opens. - Icons added by an update come as vanilla items. To use the download's icons for them, copy them from the new download's files (Changelog).
From gui.yml
On the first start, an old gui.yml and its menu words in messages.yml move into menus/. The old files are kept as gui.yml.old and messages.yml.old, with a number added if that name is already taken.
- Changed values,
modeldata, your own buttons (custom-buttons), and oldergui.ymlandconfig.ymlmenu settings carry over. - A
gui.ymlbesidemenus/is never read. - If the move fails (
gui.yml could not be split), menus open as shipped. Before the next start or reload, fix what the console names, deletemenus/and restart, or the menu words of the old files are lost.