Menus

All menu files are saved in /menus/ folder.

Types

There are 3 types of menus.

  • Common Menus, just like other menu plugins doing. You can use them open other shop menus.

  • Shop Menus, will display products in specified shop in it.

  • Buy More Menus, can select amount of you will buy or sell.

Configs

  • title: Menu title, for shop menu type, support {shop-name} to display shop displayname which set in it's config.

  • size: Menu size, only support one of the number: 9,18,27,36,45,54.

  • layout: Button layout, this is a list option, list row must equals size/9, each line lengh must equals 9.

  • buttons: Button configs, button ID must be a single char, and use it in layout option to set where this button display in menu.

  • conditions: Only players who meet the conditions can open this menu, see Conditions for more info.

  • open-actions: Do action when open this menu, see Actions for more info.

  • close-actions: Do action when close this menu, see Actions for more info. Please carefully note that when you have already opened a menu, if you open other menus through actions or other means, it will also trigger close actions.

Example:

title: 'Shop'

size: 54

conditions:
  - 'none'
  
open-actions:
  - 'sound: ui.button.click;;1;;1' 

close-actions:
  - 'sound: ui.button.click;;1;;1' 

layout:
  - '000000000'
  - '000000000'
  - '0000A0000'
  - '000000000'
  - '000000000'
  - '000000000'

buttons:
  A:
    display-item:
      material: BREAD
      name: '&dFoods'
      lore:
        - '&7Click to open food shop!'
    actions:
      - 'shop_menu: example'

For each button, we have those options:

  • display-item: The display item of this button, should use Display Item Format.

  • actions: The action will executed after we click this button.

  • fail-actions: The action will executed if we don't meet the condition of this button, see Actions for more info.

  • conditions: The condition of this button, if player don't meet this condition, then we will execute the fail-action.

Buy More Menus

Buy more menus have those special options:

amount-items:
  1:
    display-item:
      material: GREEN_WOOL
      name: '&a+1'
      lore:
        - '&7Click to add 1 amount.'
    add-amount: 1
  2:
    display-item:
      material: GREEN_WOOL
      name: '&a+10'
      lore:
        - '&7Click to add 10 amount.'
    add-amount: 10
  3:
    display-item:
      material: GREEN_WOOL
      name: '&a+32'
      lore:
        - '&7Click to add 32 amount.'
    add-amount: 32
  4:
    display-item:
      material: RED_WOOL
      name: '&c-1'
      lore:
        - '&7Click to remove 1 amount.'
    add-amount: -1
  5:
    display-item:
      material: RED_WOOL
      name: '&c-10'
      lore:
        - '&7Click to remove 10 amount.'
    add-amount: -10
  6:
    display-item:
      material: RED_WOOL
      name: '&c-32'
      lore:
        - '&7Click to remove 32 amount.'
    add-amount: -32

display-item: B

confirm-items:
  C:
    display-item:
      material: PAPER
      name: '&aConfirm'
      lore:
        - '&7Click to finish the trade!'
  D:
    display-item:
      material: PAPER
      name: '&a&lCLICK TO BUY'
      lore:
        - '&aClick to confirm and purchase'
        - '&athe quantity you have selected.'
    # You can remove click-action option, then confirm button can do all things, like buy, sell, sell all.
    # If this option exists, then this confirm button can only do the thing.
    click-action: buy
  E:
    display-item:
      material: PAPER
      name: '&c&lCLICK TO SELL'
      lore:
        - '&cClick to confirm and sell'
        - '&cthe quantity you have selected.'
    click-action: sell
  • amount-items: Select amount item config. add-amount can be replaced to set-amount option.

  • display-item: Must be a single char, use this char in layout option to set where it will display in menu.

  • confirm-items: Confirm buy or sell item config.

  • cobfirm-items.??.click-action: Make this confirm button can only do specified thing, like buy, sell.

Last updated