Package org.bukkit.event.inventory
Class TradeSelectEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.inventory.InventoryInteractEvent
org.bukkit.event.inventory.TradeSelectEvent
- All Implemented Interfaces:
- Cancellable
public class TradeSelectEvent extends InventoryInteractEvent
This event is called whenever a player clicks a new trade on the trades
 sidebar.
 
This event allows the user to get the index of the trade, letting them get the MerchantRecipe via the Merchant.
- 
Nested Class Summary
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description TradeSelectEvent(InventoryView transaction, int newIndex)
- 
Method SummaryModifier and Type Method Description static HandlerListgetHandlerList()HandlerListgetHandlers()intgetIndex()Used to get the index of the trade the player clicked on.MerchantInventorygetInventory()Gets the primary Inventory involved in this transactionMerchantgetMerchant()Get the Merchant involved.Methods inherited from class org.bukkit.event.inventory.InventoryInteractEventgetResult, getWhoClicked, isCancelled, setCancelled, setResult
- 
Constructor Details
- 
Method Details- 
getIndexpublic int getIndex()Used to get the index of the trade the player clicked on.- Returns:
- The index of the trade clicked by the player
 
- 
getInventoryDescription copied from class:InventoryEventGets the primary Inventory involved in this transaction- Overrides:
- getInventoryin class- InventoryEvent
- Returns:
- The upper inventory.
 
- 
getMerchantGet the Merchant involved.- Returns:
- the Merchant
 
- 
getHandlers- Overrides:
- getHandlersin class- InventoryEvent
 
- 
getHandlerList
 
-