Skip to content

Layout and your own buttons

Layout

Every menu file except common.yml has rows (1 to 6) and layout. Places count from the top left: row 1 is 0 to 8, and row 2 is 9 to 17. Here is stand.yml as it ships:

# menus/stand.yml
rows: 2
layout:
  head: 0           # a slot at one place
  helmet: 1
  chestplate: 2
  leggings: 3
  boots: 4
  balloon: 5
  hand: 6
  offhand: 7
  wear: 8
  buttons: 9-17     # an area: places 9 to 17
  size: auto        # auto: the button goes in the buttons area
  visible: auto
  gravity: auto
  arms: auto
  base-plate: auto
  mannequin: auto
  pose: auto
  lock: auto
  colors: auto

A slot or button takes one place, none or auto. An area takes several places, written in any of these ways:

# menus/stand.yml
layout:
  buttons: 9-17     # places 9 to 17
# menus/stand.yml
layout:
  buttons: 17-9     # the same places, from 17 down to 9
# menus/stand.yml
rows: 3
layout:
  buttons: [9, 10, 18-26]   # places and ranges in a list; 9, 10, 18-26 without brackets works too

none leaves a slot, button or area out, and -1 (or any number below 0), false and "" do the same:

# menus/stand.yml: no Main Hand slot and no Gravity button
layout:
  hand: none
  gravity: none

A button set to a place number keeps that place. For a player who may not use the button, the place stays empty:

# menus/stand.yml: Pose always at the right end of row 2
layout:
  buttons: 9-16
  pose: 17

auto

auto lets the menu pick the place itself. Every key that takes auto also takes something else in its place:

Key auto Instead of auto
rows lists.yml and mannequin.yml: just tall enough for what they show, Back and your buttons. Other menus: the number in the table below A number, 1 to 6
size to colors in stand.yml In the buttons area, side by side in its middle, only the buttons the player may use One place (empty for a player who may not use the button), or none
head to stand in pose.yml In the parts area, side by side in its middle, only the parts the page offers One place (empty while the page does not offer the part), or none
places in lists.yml One place for each entry the player may add (more if the stand already holds more), at most 48: rows of up to eight, each row centred in the eight columns right of the first column, which is Back's Places. A player gets no more places than you write
models in mannequin.yml From place 1, right after Back as shipped, nine to a row, at most 53 Places. Kinds past the last place you write are not shown
Any other slot, button or area Its place as shipped, in the table below One place (a slot or button) or places (an area), or none

The list menus with numbers in place of auto:

# menus/lists.yml: three rows, the places in the middle row
rows: 3
layout:
  back: 0
  places: 10-16

Slots and buttons are placed first, in the order of the table below, then areas. A place outside the menu, or one already taken, is left out.

Menu rows Slots and buttons Areas
stand.yml 2 Slots head to wear 0 to 8; size, visible, gravity, arms, base-plate, mannequin, pose, lock, colors auto buttons 9-17
armor.yml 1 back 0, cosmetic 4, real 5
lists.yml auto back 0 places auto
mannequin.yml auto back 0 models auto
pose.yml 1 back 0, edit 8; head, body, right-arm, left-arm, right-leg, left-leg, stand auto parts 1-7
reset.yml 1 back 0, reset 4
  • The buttons and parts areas centre the auto buttons the player may use. When the group cannot sit exactly in the middle, it sits half a place to the left (buttons) or to the right (parts).
  • auto buttons that do not fit in their area are left out.
  • With auto places or models, if Back or one of your own buttons sits where they would go, they take the free places of the menu in order instead.
  • With a rows number and auto places or models, the places that fall past the last row are not shown, and the console says how many.
  • The edit place is used by Edit, by Reset, and by the hidden paste slot.
  • A layout value BoxStand cannot read, such as a word or a range for a button, is named in the console. The slot, button or area then keeps its place as shipped, and a button that ships as auto is left out.
  • A rows number outside 1 to 6 is named in the console, and the menu has the rows in the table above (6 in lists.yml and mannequin.yml). A word other than auto counts as auto.

Your own buttons

Add them under custom-buttons in any file but common.yml. Each button gets a name you choose, such as spawn:

# menus/stand.yml
rows: 3
custom-buttons:
  spawn:
    slot: 22
    item: COMPASS
    name: "<gold>Spawn"
    left:
      - "[player] spawn"
      - "[close]"

slot is the button's place, and that place must be inside the menu and free. Without slot, or with a slot that is not a number, the button is left out. item, glow and modeldata are its icon, and item defaults to PAPER. name and lore are MiniMessage text, and both are empty by default: with no name, the button shows the item's own name. lore takes one line or a list of lines. With permission, only players with that permission see and can click the button. Without it, everyone can. BoxStand does not register this permission, so the server counts it as an op permission: ops see the button too.

# menus/stand.yml, with rows: 3 as above
custom-buttons:
  spawn:
    slot: 22
    item: COMPASS
    glow: true
    name: "<gold>Spawn"
    lore:
      - "Back to the spawn"
    permission: myserver.spawn   # only players with this permission see the button
    click:
      - "[player] spawn"

Each kind of click can run its own lines: left, right, shift-left, shift-right, middle and drop (the drop key, Q, with or without Ctrl). Clicks with no key of their own, such as a double click or a number key, run the click lines. Each of these keys takes one line or a list of lines.

# menus/stand.yml, with rows: 3 as above
custom-buttons:
  warps:
    slot: 22
    item: ENDER_PEARL
    name: "<aqua>Warps"
    click:                # every click that has no lines of its own
      - "[player] warp"
    shift-left:
      - "[player] warp shop"
    right:
      - "[close]"
Line Does
[player] <command> Runs the command as the player (this also works for other menu plugins' open commands). A slash in front of the command is optional
[console] <command> Runs the command from the server console
[open] <menu> Opens this stand's stand (menu works too), pose, mannequin, head, balloon, wear, helmet, chestplate, leggings or boots. The four armour menus open only with BoxCosmetics
[close] Closes the menu
[message] <text> Messages the player, in MiniMessage, without the prefix of messages.yml
[sound] <sound> [volume] [pitch] Plays a sound: [sound] ui.button.click 1 1. Volume and pitch default to 1
# menus/stand.yml, with rows: 3 as above
custom-buttons:
  info:
    slot: 22
    item: BOOK
    name: "<aqua>Info for {player}"
    left:
      - "[message] <green>Welcome, {player}!"
      - "[sound] ui.button.click 1 1"
    right:
      - "[open] pose"
    shift-right:
      - "[console] give {player} bread 1"
      - "[close]"
    middle:
      - "spawn"           # no [...], so this is [player] spawn

In stand.yml, the buttons area takes places 9 to 17. To make room for your buttons, add rows with rows, as in the first example, or make buttons shorter:

# menus/stand.yml: Gravity left out, and place 17 free for your button
layout:
  buttons: 9-16
  gravity: none
custom-buttons:
  spawn:
    slot: 17
    item: COMPASS
    name: "<gold>Spawn"
    left:
      - "[player] spawn"
  • lore: [] shows no lore. A click key set to [], such as left: [], makes that click do nothing: the click lines do not run for it.
  • Lines run in order. A line that does not start with [...] runs as [player].
  • A line with any other word in [...], or an [open] of a menu not in the table, does nothing and is named in the console.
  • {player} and PlaceholderAPI placeholders work in the name, the lore and the lines.
  • [open] works only when the player could open that menu themselves. For pose, that is only while nobody else poses the stand. If the player may add only one entry to a list, [open] of that list opens the stand menu.
  • On another plugin's Mannequin, your buttons show only if they sit in the menu's slot rows.
  • Updates never add or remove custom-buttons.