Skip to content

Creating a menu

Daniel Saukel edited this page Mar 9, 2018 · 13 revisions
# PRIVATE If just the menu opener is supposed to see it
# PUBLIC If anyone may see it
type: PRIVATE

# The content of this section will change depending on the opened menu page.
# Take care of the indents.
menuPages:
  1:
    buttons:
      1:
# The text the button shows. Color codes are supported.
        label: "&5&l>> PAGE 1 <<"
# The type of the button.
# TITLE = A cosmetic button that players are not supposed to interact with.
# BUTTON = A clickable button that executes a command when punched.
# FIRST_PAGE = Switchs to the first of all menu pages.
# LAST_PAGE = Switchs to the last of all menu pages.
# PREVIOUS_PAGE = Switchs to the previous menu page.
# NEXT_PAGE = Swtichs to the next menu page.
# CLOSE = Closes the menu.
        type: TITLE
# The how far on the right the button shall appear relatively to the eye direction.
        x: 0.0
# How high the button shall appear relatively to the eye direction.
        y: 0.4
      2:
        label: "&4[ CLICK ]"
        type: BUTTON
# The command to execute when the button is punched.
        command: say WOOOOHOOOOOOO
        x: 0.0
        y: 0.1
  2:
    buttons:
      1:
        label: "&5&l>> PAGE 2 <<"
        type: TITLE
        x: 0.0
        y: 0.4

# The content of this section will remain the same for all pages.
staticButtons:
  1:
    label: "&6&lHEAD LINE"
    type: TITLE
    x: 0.0
    y: 0.7
  2:
    label: "&3<<<"
    type: PREVIOUS_PAGE
# The sound to play when the button is punched.
    sound: ui.button.click
    x: -0.5
    y: -0.5
  3:
    label: "&3>>>"
    type: NEXT_PAGE
    sound: ui.button.click
    x: 0.5
    y: -0.5
  4:
    label: "&a[CLOSE]"
    type: CLOSE
    sound: ui.button.click
    x: 0.0
    y: -0.2
distance: 1.75

Clone this wiki locally