📂Shops

An example shop file is here:

settings:
  menu: 'example-shop-menu'
  buy-more: true
  shop-name: 'Food Shop'
  hide-message: false
  secret-shop-items: true
  custom-command:
    name: 'mineral'
    description: 'Custom Words'
  
general-configs:
  # This means all products in this shop will use this price mode and product mode.
  # unless they have set other value.
  price-mode: CLASSIC_ANY
  product-mode: CLASSIC_ANY
  # Support all product options, like prices, products, limits and so on!
  fail-actions:
    1:
      type: sound
      sound: block.note_block.bass
    
items:
  A:
    display-name: "Apple"
    price-mode: ANY
    product-mode: ALL
    products:
      1:
        material: APPLE
        amount: 1
      2: 
        material: BREAD
        amount: 5
        conditions:
          1:
            type: permission
            permission: 'group.vip'
        give-actions:
          1:
            type: message
            message: 'Wow, seems that you are a VIP player, so we bonud give you 5 breads!'
    buy-prices:
      1:
        economy-plugin: Vault
        amount: 200
        placeholder: '{amount} Coins'
        start-apply: 0
      2:
        economy-plugin: PlayerPoints
        amount: 10
        placeholder: '{amount} Points'
        start-apply: 5
    sell-prices:
      1:
        economy-plugin: Vault
        amount: 50
        placeholder: '{amount} Coins'
      2:
        economy-plugin: PlayerPoints
        amount: 1
        start-apply: 5
        placeholder: '{amount} Points'
        give-actions:
          1: 
            type: message: 
            message: 'Wow, seems that you have already sell 5 apples!'
    buy-actions:
      1:
        type: player_command
        command: 'say %player_name% purchased an Apple!'
      2:
        type: announcement
        message: '&7%player_name% purchased an Apple!'
  B:
    display-item:
      material: BREAD
      name: '&cSuper Bread'
    display-name: "Bread"
    add-lore:
      - '@a&ePurchase: {buy-price}'
      - '@b&eSell: {sell-price}'
      - '&eDrop to buy, right to sell'
    click-event:
      buy: 'DROP'
      sell: 'RIGHT'
    bedrock:
      hide: false
      icon: 'url;;https://raw.githubusercontent.com/Jens-Co/MinecraftItemImages/main/1.20/bread.png'
    buy-more: true
    buy-more-menu:
      menu: buy-more-2
      max-amount: 16
    price-mode: ANY
    product-mode: ALL
    products:
      1:
        material: BREAD
        amount: 1
    buy-prices:
      1:
        economy-plugin: Vault
        amount: 200
        placeholder: '{amount} Coins'
        start-apply: 0
      2:
        economy-plugin: PlayerPoints
        amount: 10
        placeholder: '{amount} Points'
        start-apply: 5
    sell-prices:
      1:
        economy-plugin: Vault
        amount: 50
        placeholder: '{amount} Coins'
      2:
        economy-plugin: PlayerPoints
        amount: 1
        start-apply: 5
        placeholder: '{amount} Points'
    buy-limits:
      global: 100
      default: 10
      test-condition: 20
    buy-limits-conditions:
      test-condition:
        1:
          type: permission
          permission: 'test.permission'
    buy-times-reset-mode: 'TIMED'
    buy-times-reset-time: '00:00:00'
  C:
    display-item: 
      material: DIAMOND
    as-sub-button: A
buttons:
  a:
    display-item:
      material: arrow
      name: '&cPrevious page'
      lore:
        - '&7Click to view previous page!'
    actions:
      1:
        type: shop_menu
        shop: 'crops'    

Settings

  • menu: Shop menu name, which means menu file name. 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. For info about menus, please view Menus page.

  • buy-more: Whether product in this shop can open buy more menu.

  • shop-name: Shop display name, which used in {shop-name} placeholder.

  • hide-message: Whether we hide the messages that will send after player buy or sell items in this shop. By default, only hide success buy or sell message, for fail message like limit reached or not enough money, you need also set placeholder.click.enabled option value to true in your config.yml file to hide them.

  • secret-shop-items: If enabled, if the player does not meet the open condition of the menu corresponding to the shop where the product is located or the product is not displayed in the menu, the corresponding product will be automatically hidden and cannot be traded. You can set secret rule at config.yml file.

  • custom-command: Custom Open Command Settings for this shop. If not set, this menu can only be opened by /shop menu command. (PREMIUM)

General Configs

The product configuration options set here will apply to all products. For buy-action, sell-actions and fail-actions, we will auto merge the value set here and in product configs.

Items

Items is products, products can not only being real items, but also virtual items, like 100 gems economy.

For more info, please view Products page.

Buttons

Shops can add buttons which has custom actions when player clicks it.

For each button, we have those options:

Last updated