Sections

You will learn step by step what every option in section configs mean and how to configure/use it.

The file name defines the shop internal name and needs to match the filename for the shop config inside the shops folder

General information about section configurations.

Since version v6 or Premium v5 of the plugin, sections are stored in their seperate config, instead of using a single sections.yml config to store all of them.

These configs store all the custom data used to create shop sections, and are shown in the Main Menu when you open the /shop GUI. It allows to configure the display item, shop title, slot in the main menu, navigation bar, economy type, the fill item and general settings on how the section behaves inside the shop.

Please read About YAML before editing your files! It DOES NOT tolerate any errors! Validate it!

Basic section example
enable: true
slot: 4
title: " &8>>--- &a&lFarming &r&8---<< "
sub-section: false
hidden: false
economy: VAULT
fill-item:
  material: "GRAY_STAINED_GLASS_PANE"
nav-bar:
  mode: DISABLED
item:
  material: WHEAT
  name: '&aClick to enter the farming shop'
  lore: 
  - "0x00CB14Gather your farming supplies here!"

All options you can use and their meanings.

Item options list:

  • item: [Required] - Config section to configure the display item

  • slot: [Required] - is the slot of the item in the main shop. (must be a number from 0 - 44 for the first page. Additional pages not supported yet. Cannot be the same slot as another section item)

  • enable: - Disabled or enables the shop within the plugin

  • title: - The shop title when inside the shop. Do not confuse with the item displayname.

  • hidden: - Whether or not this shop category can be seen and accessed via the main menu

  • sub-section: - Whether this section is considered as a sub section

  • display-item: - Makes the item a displayitem.

  • economy: - Specifies the default economy used for this section

  • fill-item: - Allows to specify a fill item for this section

  • dynamic-pricing: - Per section dynamic pricing settings *Premium feature

  • click-commands: - A list of commands which run when a player enters/clicks the shop section *Premium feature

  • rotating-shop-settings: - Section to change settings for this rotating shop *Premium feature

Item configuration:

  • material: [Required] - The type(material) of the item

  • name: - The displayname of the item

    • Will also be the title of the shop if no name has been specified.

    • Supports chat colors or custom RGB values

  • lore: - A list of messages displayed on the item

  • enchantments: - The enchantments of the display item

  • potiontypes: - The potion types of the display item

  • armor-trim: - The armor trim of the display item

  • enchantment-glint: - Whether the display item has a enchantment glint effect on it

  • skullowner: - The skull owner of the item

    • Should be a valid player name

  • armorcolor: - A custom RGB color for leather armor

  • stack-size: - The stack size of the item

  • skull-texture: *Premium feature - The custom skull texture of the player head

  • NBTData: *Premium feature - Custom data for the item

# Options to configure the section item inside the main shop GUI
item:
  # The material of the item
  material: "BEACON"
  # The name of the item
  # If no shop title has been set, this will be used as a fallback
  name: "&cClick to enter the Example_Shop"
  # The lore of the item
  lore:
    - "&aThis section contains"
    - "&aa ton of different cool items."
  # Item enchantments
  enchantments:
    - "KNOCKBACK:10"
    - "SHARPNESS:10"
    - "MENDING"
    - "excellentenchants:BLAST_MINING:3"
  # Whether this item should have an enchantment glow affect
  enchantment-glint: true
  # The skull owner for this item
  skullowner: "Notch"
  # The skull texture of the item
  skull-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjUzMGQ5YjAwZDA3NjEyNWRmOWE1YjE3ZjQzN
    jcwOTg0NDQyY2U1NzM5ZGViZGJkM2M1MzA0MDkyNjA1MmNhNiJ9fX0="
  # Custom armor color for leather armor
  armorcolor: "#0022FF"
  # The stack-size of the item
  stack-size: 16
  # Custom NBT data of the item
  NBTData: "{CustomModelData:40}"

Item slot:

  • The position/slot of the display item inside the main shop GUI

    • When outside the range of the main shop size, the slot will be automatically changed to the first that is available.

  • Slot counts start by 0, the max slot is defined by the main shop size * 9

slot: 15

Enabled:

  • Defines whether this shop should be loaded inside the plugin

  • Disabled shops won't be loaded, which allows them to be re-enabled at any time later

enable: false

Title:

  • The shops title seperate from the item display name

    • Showed on top of the inventory when browsing the shop contents

  • If not specified, the item's display name will be the title of the shop

    • If no item display name is specified, the shop will get a invalid title.

  • Supports chat colors or custom RGB values

Hidden shop:

  • Whether this shop section can be seen and accessed via the main shop

  • If a section is hidden, it will be only accessible through the direct shop command (/shop <section>)

hidden: true

Sub shops:

  • Whether this shop is a subsection

  • Subsections will be hidden from the main menu and cannot be opened via commands

sub-section: true

Display items:

  • Makes this section a simple display item to decorate the main shop GUI

  • Display items won't have a section linked and nothing will happen when a player clicks it inside the main shop GUI, neither will this section be accessible via /shop.

display-item: true

Fill item:

  • A fill item will fill empty spots inside the shop category for this section

fill-item:
  material: "GRAY_STAINED_GLASS_PANE"
  name: ' '
  lore:
    - "&8I'm a fill item"

Specific currency:

  • Sets the economy used within this section, all items will be able to be bought/sold using this economy type.

  • This option uses the same format as the default economy specified inside the config.yml

economy: ULTRA_ECONOMY:Gems

Dynamic-pricing:

  • enabled:

    • Allows to enable or disable dynamic pricing inside this section

    • Note that this only allows to disable DP in this section, you will have to enable global dynamic pricing for this to work.

  • max-stock:

    • The same as the DP max stock setting inside the config.yml, but instead this will strictly define the rate at which prices change when players buy items IN THIS SECTION instead of having a difficulty setting based on the item's price.

    • This is known to be more precise, lower values mean faster price changes compared to higher values.

dynamic-pricing:
  enabled: false
  max-stock: 50000

Click commands:

You may use the placeholder %player% to get the player name or %uuid%

  • Click commands are triggered upon when the player clicks the section

  • close-menu:

    • When enabled, the shop won't open when clicked.

      • This allows click commands to redirect the player to a different GUI for example.

    • If disabled, the shop will open like normal while the click commands get executed in the background.

close-menu: true
click-commands:
- "minecraft:give %player% gold_nugget 3"
- "minecraft:give %player% blue_wool 6"
- "minecraft:give %player% yellow_wool 6"

Rotating shops:

Rotating shops require the shop-type option to be set to ROTATING

Rotating shops have a different config style compared to regular shop category's, and so, per page settings are configured inside the section config instead of the shops config

Rotating shops, unlike regular shop category's, have only a limited amount of items displayed each time. Every interval a new set of random items will be choosen to display.

  • The interval option allows to specify a custom interval for when the next rotation with different items will be displayed

    • Interval periods are formatted using

      • d - Specifies the days

      • h - Specifies the hours

      • m - Specifies the minutes

      • s - Specifies the seconds

    • Example of a 12 hours, 30 minutes and 15 seconds interval: 12h 30m 15s

  • The can-repeat option sets whether or not items have a random chance to display

    • If disabled, items cannot be repeated across all intervals of this shop

      • The amount of rotations is determined by how many available items there are in this shop, divided by the amount of display slots. Example for a shop with 24 items and 3 display slots: 24/3=8 rotations before items can repeat again

    • When enabled, allows items to be randomly displayed(per item chances can be set using the display-chance item option).

      • Items can also only be displayed once per rotation, instead of once for all rotations

  • The broadcast option sets whether to announce a global message into chat when a new rotation of items gets loaded

  • The gui-rows option, similar to the option inside the shop config files allows a per page size to be set

  • The display-slots option creates display slots for this shop page

    • For example if a rotating shop has 3 display slots in total, but 24 randomly configured items. Every X interval a new set of 3 random items is displayed.

shop-type: ROTATING
rotating-shop-settings:
  interval: 12h 30m 15s
  can-repeat: true
  broadcast: false
  # The different pages inside this section
  pages:
    page1:
      gui-rows: 3
      display-slots:
      - 12
      - 16
    page2:
      gui-rows: 3
      display-slots:
      - 10
      - 14
Complete example section config (Including premium item options)
# This is an example section file which is only a reference for how section configs should be created in /sections/<shopName>.yml

# The file name defines the shop internal name and needs to match the filename for the section inside the shops folder
# Example:
# /sections/Food.yml -> /shops/Food.yml
# /sections/Workstations.yml -> /shops/Workstations.yml
#
# If this does not match, an example section will be created with name '<shopName>.yml', so make sure it matches!

# Defines whether this section should be loaded at all
enable: true

# The slot of the section item inside the main shop screen
slot: 5
# This is a required option

# The title of the shop different from the shop name
title: "&c&lExample_Shop"
# Defaults to the item name if empty

# Whether this shop section can be seen and accessed via the main shop
# If a section is hidden, it will be only accessible through the direct shop command (/shop <shopName>)
hidden: false

# Whether this shop is a subsection,
# subsections will be hidden from the main menu and cannot be opened via commands
sub-section: false

# Makes this section a simple display item to decorate the main shop GUI
# Display items won't have a section linked and nothing will happen when a player clicks it inside the main shop GUI,
# neither will this section be accessible via /shop <shopName>
display-item: true

# The economy used within this section, this is the same format as the config.yml uses
# See a list of all available economy types here: https://wiki.gpplugins.com/economyshopgui/file-configuration/config.yml#economy-provider
economy: "ITEM:material:EMERALD name:&a&lGems"

# If click commands are used within this section, should we close the shop after the click commands have been executed?
# If disabled with click commands, the shop will open like normal while click commands are being executed in the background.
close-menu: false

# Click commands are triggered upon every time a player clicks the section item to enter the shop
click-commands:
  - "/eco give %player% 1"
  - "minecraft:give %player% gold_nugget 3"

# When global DynamicPricing is enabled inside the config.yml these options can be used
dynamic-pricing:
  # Can be used to disable DP in this section
  # Note that global DP needs to be enabled to disable this, it is not possible to enable DP for this section alone
  enabled: false
  # The same as the DP max stock setting inside the config.yml, but instead this will strictly define the rate at which prices change
  # when players buy items IN THIS SECTION instead of having a difficulty setting based on the item's price.
  # This is known to be more precise, lower difficulty values mean faster price changes compared to higher difficulty values
  max-stock: 50000

# The section fill item
# This item will be added to every empty slot inside the section
fill-item:
  material: "GRAY_STAINED_GLASS_PANE"
  name: ' '
  lore:
    - "&8I'm a fill item"

# The navigation bar which defaults to this section
# Leave empty to make this section inherit its navigation bar from the fall-back nav bar at the config.yml
nav-bar:
  # There are currently 3 navigation bar modes:
  # SELF = The section will have its own navigation bar separate from the default one inside the config.yml
  # DISABLED = No navigation bar will be used across this section
  # INHERIT = The same as leaving these options blank, in other words, the default will be used
  mode: "SELF"
  # The fill item for this navigation bar which will fill blank spots
  fill-item:
    material: "GRAY_STAINED_GLASS_PANE"
    name: ' '
  # The items containing this navigation bar, the last 9 slots of the inventory
  items:
    1:
      material: "RED_WOOL"
      name: '%translations-previous-page%'
      action: PAGE_BACK
      # When pagination for this item is enabled, this item will only show when the shop has more than 1 page.
      paginated:
        enabled: true
        # The below item will show as a placeholder for the actual navigation bar item only when the shop has one page.
        orElse:
          material: AIR
      slot: 4
    2:
      material: "NETHER_STAR"
      name: '%translations-current-page%'
      slot: 5
    3:
      material: "GREEN_WOOL"
      name: '%translations-next-page%'
      action: PAGE_NEXT
      paginated:
        enabled: true
        orElse:
          material: AIR
      slot: 6

# Options to configure the section item inside the main shop GUI
item:
  # The material of the item
  material: "BEACON"
  # The name of the item
  # If no shop title has been set, this will be used as a fallback
  name: "&cClick to enter the Example_Shop"
  # The lore of the item
  lore:
    - "&aThis section contains"
    - "&aa ton of different cool items."
  # Item enchantments
  enchantments:
    - "KNOCKBACK:10"
    - "SHARPNESS:10"
    - "MENDING"
    - "excellentenchants:BLAST_MINING:3"
  # Whether this item should have an enchantment glow affect
  enchantment-glint: true
  # The skull owner for this item
  skullowner: "Notch"
  # The skull texture of the item
  skull-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjUzMGQ5YjAwZDA3NjEyNWRmOWE1YjE3ZjQzN
    jcwOTg0NDQyY2U1NzM5ZGViZGJkM2M1MzA0MDkyNjA1MmNhNiJ9fX0="
  # Custom armor color for leather armor
  armorcolor: "#0022FF"
  # The stack-size of the item
  stack-size: 16
  # Custom NBT data of the item
  NBTData: "{CustomModelData:40}"

# The shop type requires to be set for rotating shops, 
# or defaults to a shop category
shop-type: ROTATING

# Settings for rotating shops
rotating-shop-settings:
  # Specifies the period for how frequently this rotating shop 
  # changes its display items
  interval: 12h 30m 15s
  # Enables or disables randomly displayed items
  # Disabling this will make sure every item only displays once randomly
  # but without a specific display chance
  can-repeat: true
  # The different pages inside this section
  pages:
    page1:
      # Similar to the option in shop configs,
      # this option allows to specify the page size in rows
      gui-rows: 3
      # Creates displayable slots for items
      # These slots will display a new set of items each rotation
      display-slots:
      - 12
      - 16
    page2:
      gui-rows: 3
      display-slots:
      - 10
      - 14

Last updated