Guide how to create villager shops. merchants.yml
Eco plugins (EcoItems, EcoArmor etc) is not supported here! You can use them for results but you will encounter visible glitches if you use them as ingredients. (It will still work, but until you take out the result item it will be displayed as air/nothing). This is due to how Eco handles items and client side item lore in general (most likely at least).
merchants:
# The key is the id of the merchant (used in commands)
test:
# Name of the merchant
name: "Test Merchant"
# Permission required to use the merchant (Optional)
permission: "test.permission"
# Menu item in the global merchant menu
menu:
# Title of the trade window
title: "{name}"
# Replace the lore if the merchant is locked
locked-lore:
- "&7Unlock this merchant by"
- "&7completing &aDiamond collection V&7!"
item:
material: emerald
name: "&a{name}"
slot: 10
lore:
- "&7Click to open the merchant"
# Offers that the merchant has
offers:
# Ingredient items are defined the same way as in recipes.
# You can have at most 2 ingredients (vanilla limit) and you must always set the amount.
- ingredients:
- "minecraft:cobblestone/64"
- "minecraft:coal/7"
# Offer result is defined the same way as in recipes
result: "mythicmobs:my_item/1"
# Permission to view and use this offer. (Optional)
permission: "test.merchant.offer.1"
Players can open the merchants with /merchants (main menu) or /merchants <merchant id>. Merchants and offers the player has no permission for are hidden from them; in the main merchant menu locked merchants are shown with the locked-lore.
Item amounts can't be bigger than the max stack size of the item.
The main merchant menu (opened with /merchants) is configured in menus/merchants.yml. Every merchant's menu.item is placed in this menu.
title: "Merchants"
rows: 6
filler:
material: black_stained_glass_pane
hide-tooltip: true
name: ""
custom-items:
close:
material: barrier
name: "&cClose"
slot: 49
on-click:
- "[close]"