Configuration

Here you can read what you can set up in the merchants folder.

You can find how to set up entities sections here What actions we know or how to manipulate them here. How conditions work or how to manipulate them can be found here. All information about setting up an item for a product can be found here.


🧭Region [🆕]

This region controls where your merchant can spawn — either inside a WorldGuard region or within a specific area.

🌍 WorldGuard support (optional)

You must have the WorldGuard plugin downloaded on your server. To use a WorldGuard region:

worldguard:
  world: "world"         # Name of the world
  name: "region_name"    # Name of your WorldGuard region

🧱 Settings (optional)

Here you can find the actual setup for this region, from setting the boundaries to spawning on the given blocks

min-y: 60   # Minimum height (optional)
max-y: 100  # Maximum height (optional)
#min-x: ...   # Use region's X boundary (optional)
#max-x: ... (optional)
#min-z: ... (optional)
#max-z: ... (optional)
block: # optional
  whitelist: # only spawn on these blocks (optional)
    - GRASS_BLOCK
    - STONE
  blacklist: # never spawn on these blocks (optional)
    - WATER
    - LAVA

➡️ Example: Merchant will spawn between Y=60 and Y=100, but X and Z are based on the WorldGuard region.


enabled: false # Whether the merchant is enabled

entities:
  example_name:
    chance: 60 # Chance of spawning this entity (0-100)
    type: VILLAGER # Entity type (e.g., VILLAGER, ZOMBIE, etc.)
    name: '&9&lJohnny' # Display name of the entity
    gravity: false # Whether the entity is affected by gravity
    glowing: true # Whether the entity is glowing
    AI: true # Whether the entity has AI enabled
    invulnerable: true # Whether the entity is invulnerable
    silent: true # Whether the entity is silent
  example_zombie:
    chance: 60 # Chance of spawning this entity (0-100)
    type: ZOMBIE # Entity type (e.g., VILLAGER, ZOMBIE, etc.)
    name: '&2&lZombie' # Display name of the entity
    gravity: false # Whether the entity is affected by gravity
    glowing: true # Whether the entity is glowing
    AI: true # Whether the entity has AI enabled
    invulnerable: true # Whether the entity is invulnerable
    silent: true # Whether the entity is silent
    equipments:
      main-hand:
        material: EMERALD # Material of the item in the main hand
      off-hand:
        material: EMERALD # Material of the item in the offhand
      helmet:
        material: GOLDEN_HELMET # Material of the item in the helmet slot
        name: '&bGolden Helmet' # Display name of the item
      chestplate:
        material: DIAMOND_CHESTPLATE # Material of the item in the chestplate slot
        name: '&bDiamond Chestplate' # Display name of the item
        enchantments: # List of enchantments for the chestplate
          - 'PROTECTION;4'
          - 'UNBREAKING;3'
      leggings:
        material: IRON_LEGGINGS # Material of the item in the leggings slot
        name: '&bIron Leggings' # Display name of the item
      boots:
        material: LEATHER_BOOTS # Material of the item in the boots slot
        name: '&bLeather Boots' # Display name of the item
        enchantments: # List of enchantments for the boots
          - 'FEATHER_FALLING;4'
          - 'UNBREAKING;3'

time:
  # Time interval for updating the merchant's inventory (in minutes)
  update: '60-180' # in minutes
  # Time interval for despawning the merchant (in minutes)
  despawn: '15-20' # in minutes

click: # Actions to perform when the merchant is clicked
  actions:
    - open-menu: 'johnny' # Action to open the tools menu when the item is clicked

start: # Actions to perform when the merchant is started
  actions:
    - broadcast:
        - ''
        - '&6⚠ A mysterious merchant has arrived in &e%loc_world%(%loc_x%,%loc_y%,%loc_z%)!'
        - '&7Trade rare items before they disappear...'
    - sound: 'ENTITY_EXPERIENCE_ORB_PICKUP;1;1'

end: # Actions to perform when the merchant is ended
  actions:
    - broadcast:
        - ''
        - '&6⚠ The merchant has packed up and left %loc_world%(%loc_x%,%loc_y%,%loc_z%).'
        - '&7You''ll have to wait for their return.'
    - sound: 'BLOCK_ANVIL_FALL;1;1'

categories: # Categories of items available in the merchant's inventory
  'blocks':
    item-slot-id: 'B' # Slot ID for the tools category
    items: '2-6' # Items to display in the category
    actions:
      - conditions:
          - placeholders:
              - 'money>=%price%' # Check if the player has permission
      - success-actions: # Actions to perform if the player has enough money
          - remove-money: '%price%' # Remove money from the player
          - give-product: '' # Give the product to the player
          - close-inv: true # Close the inventory after purchase
      - failure-actions: # Actions to perform if the player does not have enough money
          - message: '&cYou do not have enough money to buy this item!' # Message sent if the player does not have enough money
          - close-inv: true # Close the inventory after purchase
    products:
      'andesite':
        price: 400 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'ANDESITE' # Material of the item to be sold
          amount: 32 # Amount of the item to be sold
        amount: 32 # Amount of the product to be sold
        material: 'ANDESITE' # Menu material of the product
        name: '&bAndesite' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Andesite &ffor &e%price% &fcoins!'
      'cobblestone':
        price: 400 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'COBBLESTONE' # Material of the item to be sold
          amount: 64 # Amount of the item to be sold
        material: 'COBBLESTONE' # Menu material of the product
        amount: 64
        name: '&bCobblestone' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Cobblestone &ffor &e%price% &fcoins!'
      'diorite':
        price: 500 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'DIORITE' # Material of the item to be sold
          amount: 32 # Amount of the item to be sold
        material: 'DIORITE' # Menu material of the product
        amount: 32 # Amount of the product to be sold
        name: '&bDiorite' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Diorite &ffor &e%price% &fcoins!'
      'end_stone':
        price: 800 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'END_STONE' # Material of the item to be sold
          amount: 34 # Amount of the item to be sold
        material: 'END_STONE' # Menu material of the product
        name: '&bEnd Stone' # Menu display name of the product
        amount: 34 # Amount of the product to be sold
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
            - message: '%prefix% &fYou have purchased <#10e032>End Stone &ffor &e%price% &fcoins!'
      'end_stone_brick':
        price: 800 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'END_STONE_BRICKS' # Material of the item to be sold
          amount: 20 # Amount of the item to be sold
        material: 'END_STONE_BRICKS' # Menu material of the product
        amount: 20 # Amount of the product to be sold
        name: '&bEnd Stone Brick' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
            - message: '%prefix% &fYou have purchased <#10e032>End Stone Brick &ffor &e%price% &fcoins!'
      'stone_bricks':
        price: 500 # Price of the product
        sell-item: # Item to be sold when the product is purchased
          material: 'STONE_BRICKS' # Material of the item to be sold
          amount: 32 # Amount of the item to be sold
        amount: 32 # Amount of the product to be sold
        material: 'STONE_BRICKS' # Menu material of the product
        name: '&bGolden Hoe' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e100'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
            - message: '%prefix% &fYou have purchased <#10e032>Stone Bricks &ffor &e%price% &fcoins!'
  'wood':
    item-slot-id: 'W' # Slot ID for the wood category
    #items: '2-6' # Items to display in the category
    actions: # Actions to perform when the wood category is clicked
      - conditions: # Conditions to check before performing actions
          - placeholders: # Placeholders to check conditions
              - 'money>=%price%' # Check if the player has enough money
      - success-actions: # Actions to perform if the player has enough money
          - remove-money: '%price%' # Remove money from the player
          - give-product: '' # Give the product to the player
          - close-inv: true # Close the inventory after purchase
      - failure-actions: # Actions to perform if the player does not have enough money
          - message: '&cYou do not have enough money to buy this item!' # Message sent if the player does not have enough money
          - close-inv: true # Close the inventory after purchase
    products:
      'oak_planks':
        price: 400 # Price of the product
        priority: 100 # Priority of the product (higher number = higher priority)
        chance: 80 # Chance of the product appearing in the menu (0-100)
        sell-item: # Item to be sold when the product is purchased
          material: 'OAK_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'OAK_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bOak Planks' # Menu display name of the product
        lore: # Lore of the product
        - ''
        - '&fPrice: &e%price%'
        - ''
        - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
        - message: '%prefix% &fYou have purchased <#10e032>Oak Planks &ffor &e%price% &fcoins!'
      'spruce_planks':
        price: 400 # Price of the product
        priority: 70 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'SPRUCE_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'SPRUCE_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bSpruce Planks' # Menu display name of the product
        lore: # Lore of the product
        - ''
        - '&fPrice: &e%price%'
        - ''
        - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
        - message: '%prefix% &fYou have purchased <#10e032>Spruce Planks &ffor &e%price% &fcoins!'
      'birch_planks':
        price: 400 # Price of the product
        priority: 60 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'BIRCH_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'BIRCH_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bBirch Planks' # Menu display name of the product
        lore: # Lore of the product
        - ''
        - '&fPrice: &e%price%'
        - ''
        - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
        - message: '%prefix% &fYou have purchased <#10e032>Birch Planks &ffor &e%price% &fcoins!'
      'jungle_planks':
        price: 400 # Price of the product
        priority: 50 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'JUNGLE_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'JUNGLE_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bJungle Planks' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Jungle Planks &ffor &e%price% &fcoins!'
      'acacia_planks':
        price: 400 # Price of the product
        priority: 40 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'ACACIA_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'ACACIA_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bAcacia Planks' # Menu display name of the product
        lore: # Lore of the product
            - ''
            - '&fPrice: &e%price%'
            - ''
            - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
            - message: '%prefix% &fYou have purchased <#10e032>Acacia Planks &ffor &e%price% &fcoins!'
      'cherry_planks':
        price: 400 # Price of the product
        priority: 30 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'CHERRY_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'CHERRY_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bCherry Planks' # Menu display name of the product
        lore:
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Cherry Planks &ffor &e%price% &fcoins!'
      'dark_oak_planks':
        price: 400 # Price of the product
        priority: 20 # Priority of the product (higher number = higher priority)
        sell-item: # Item to be sold when the product is purchased
          material: 'DARK_OAK_PLANKS' # Material of the item to be sold
          amount: 30 # Amount of the item to be sold
        material: 'DARK_OAK_PLANKS' # Menu material of the product
        amount: 30 # Amount of the product to be sold
        name: '&bDark Oak Planks' # Menu display name of the product
        lore: # Lore of the product
          - ''
          - '&fPrice: &e%price%'
          - ''
          - ' &a» Click to buy'
        actions: # Actions to perform when the product is purchased
          - message: '%prefix% &fYou have purchased <#10e032>Dark Oak Planks &ffor &e%price% &fcoins!'
          
region: # Region configuration for the merchant
  worldguard: # WorldGuard region configuration
    world: 'world' # World name where the region is located
    name: 'market' # Name of the WorldGuard region
  min-y: 70 # Minimum Y coordinate for the region
  max-y: 100 # Maximum Y coordinate for the region
  block: # Blocks that can be placed in the region
    whitelist: # List of blocks that can be placed
      - GRASS_BLOCK
    blacklist: # List of blocks that cannot be placed
      - LAVA

Last updated