When the price of a shopitem is items, players need to sell those items from their inventory in order to receive the defined reward.
- - type:EMERALD
In order for items contained in the player inventory to be accepted they do not necessarily need to be identical to the price item: For example items with additional lore or a custom name are accepted aswell. Additionally you can define additional attributes (besides material) an item needs to have to be "accepted" (allowed to be sold).
When is an item accepted?
All items in the main inventory (armor excluded) are considered.
Obviously needs to be identical.
If the item is a tool/armor/weapon and the config option "AllowSellingDamagedItems" is true the durability (damage of the item) is ignored.
Else it needs to be identical to the price item. For example in case of wool it needs to have the same color and in case of wood it needs to have the same subtype.
If the price item has a custom name defined, the player item needs to have the same name, else the name of the player item is ignored.
If the price item has a custom lore defined, the player item needs to have a lore with the same upper lines (can contain additional lines below), else the player item lore is ignored. Example usage:
- - type:DIAMOND_SWORD
- lore1:Rarity: Epic
In case of potion effects, enchantments and other ItemData shop item and player item need to have identical attributes in order for the player item to be accepted.
Note that if you want to allow players selling Vanilla potions you use "potion":