Package org.bukkit.inventory
Interface MerchantInventory
Represents a trading inventory between a player and a merchant.
 
The holder of this Inventory is the owning Villager, or null if the player is trading with a merchant created by a plugin.
The holder of this Inventory is the owning Villager, or null if the player is trading with a merchant created by a plugin.
- 
Method SummaryModifier and TypeMethodDescriptionGets the Merchant associated with this inventory.Get the currently active recipe.intGet the index of the currently selected recipe.Methods inherited from interface org.bukkit.inventory.InventoryaddItem, 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, setStorageContentsMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Method Details- 
getSelectedRecipeIndexint getSelectedRecipeIndex()Get the index of the currently selected recipe.- Returns:
- the index of the currently selected recipe
 
- 
getSelectedRecipeGet 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.- Returns:
- the currently active recipe
 
- 
getMerchantGets the Merchant associated with this inventory.- Returns:
- merchant
 
 
-