public interface MerchantInventory extends Inventory
The holder of this Inventory is the owning Villager, or null if the player is trading with a merchant created by a plugin.
Methods inherited from interface org.bukkit.inventory.Inventory
addItem, all, all, clear, clear, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, setContents, setItem, setMaxStackSize, setStorageContents
int getSelectedRecipeIndex()Get the index of the currently selected recipe.
- the index of the currently selected recipe
Get the currently active recipe.
This will be
nullif the items provided by the player do not match the ingredients of the selected recipe. This does not necessarily match the recipe selected by the player: If the player has selected the first recipe, the merchant will search all of its offers for a matching recipe to activate.
- the currently active recipe
Gets the Merchant associated with this inventory.