🔲General 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: Shop menus will display products in specified shop in it. Each shop config has a menu option to set their corresponding shop menu. The shop menu has all features of a common menu. Multiple shops can share the same shop menu, so when you open these stores, the layout of the menu will be the same.

  • Buy More Menus: Can select amount of you will buy or sell. This type of menus have more settings, please view Buy More Menus page to know more. Buy more menu can only open from shop menus with selecting a product, it can not be directly opened.

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. For more info, please view below.

  • dynamic-layout: If you are using dynamic value like placeholders in layout option, you need enable this option. This will cost extra performance. (PREMIUM)

  • buttons: Button configs, button ID is being used in layout option to set where this button display in menu.

  • conditions: Only players who meet the conditions can open this menu, use Condition Format here.

  • open-actions: Do action when open this menu, use Action Format here.

  • close-actions: Do action when close this menu, use Action Format here. 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.

  • bedrock: Please view Bedrock Menu page to know about it.

  • custom-command: Custom Command settings for common menu, if you want to set custom command for shop menu, please add them at Shops config. (PREMIUM)

Example:

title: 'Shop'

size: 54

bedrock:
  enabled: true
  content: '&fWelcome to shop.'
  
custom-command:
  name: 'mineral'
  description: 'Custom Words'

conditions: 
  1:
    type: permission
    permission: 'test.required'
  
open-actions:
  1:
    type: sound
    sound: 'ui.button.click' 

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

dynamic-layout: false

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

buttons:
  A:
    display-item:
      material: BREAD
      name: '&dFoods'
      lore:
        - '&7Click to open food shop!'
    actions:
      1:
        type: shop_menu
        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. Use Action Format here.

  • fail-actions: The action will executed if we don't meet the condition of this button. Use Action Format here.

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

Layout Option

The menu and shop feature in the plugin are separate, and their configurations are stored in the menus folder and shops folder respectively.

  • To know more info about menu feature, please read the Menus chapter.

  • To know more info about menu feature, please read the Shops chapter.

  • To know more info about the effect of other folder, please read the Configuration files page.

The following is a sample configuration file for a shop:

settings:
  menu: 'example-shop-menu'
  buy-more: true
  shop-name: 'Blocks Shop'
  hide-message: false

items:
  A:
    # ...
  B:
    # ...
  C:
    # ...

In there you’ll find the settings.menu option, which is crucial because it’s the central hub that connects your shop and menu. In this example, we set it to example-shop-menu.

You should be find the menu file at the menus folder, it will called example-shop-menu.yml.

title: '{shop-name}'
size: 54

layout:
  - '000000000'
  - '0ABCDEFG0'
  - '0HIJKLMN0'
  - '0OPQRSTU0'
  - '000000000'
  - 'a0003000b'

buttons:
  # ...

Among them, the layout option is crucial, as it determines where your products or buttons will be displayed. You will find that it consists of 6x9 characters, with each character corresponding to a slot in the Minecraft chest inventory. The characters entered in the corresponding position represent the items or buttons with the corresponding ID that we will display.

In this example:

  • Actually, since there is no product or button with an ID of 0, nothing will be displayed in the slot with a character of 0.

  • If the shop using this menu has products with IDs A, B, C, D, etc., the corresponding products will be displayed in the corresponding slots.

  • The same goes for buttons. I forgot to tell you that you can set custom buttons not only in the menu configuration file, but also in the shop configuration file.

  • If you change the value of the size option, don't forget to remove the extra lines in the layout option. For example, if you set the value of the size option to 36, then the character composition of the layout option is 4x9.

You can also use multiple characters to represent slots, in which case you need to use ` symbols to separate these multiple characters for the plugin to recognize them. For example:

layout:
  - '000000000'
  - '0`b1``b2``b3``b4``b5``b6``b7`0'
  - '0HIJKLMN0'
  - '0OPQRSTU0'
  - '000000000'
  - 'a0003000b'

with this shop or button configs:

items: # or buttons:
  b1: # Product ID
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    products: 
      #...
    sell-prices:
      #...
  b2:
    #...
  b3:
    #...
  b4:
    #...
  b5:
    #...
  b6:
    #...
  b7:
    #...

Dynamic Layout - Premium

You can even also use PlaceholderAPI or built-in placeholder value in layout option, but you need enable dynamic-layout option in menu configs. Like:

dynamic-layout: true

layout:
  - '000000000'
  # Using random placeholder here!
  - '0`{random_daily;;1}``{random_daily;;2}``b3``b4``b5``b6``b7`0'
  - '0HIJKLMN0'
  - '0OPQRSTU0'
  - '000000000'
  - 'a0003000b'

Last updated