public class TradeSelectEvent extends InventoryInteractEvent
This event allows the user to get the index of the trade, letting them get the MerchantRecipe via the Merchant.
Event.Resulttransaction| Constructor and Description | 
|---|
TradeSelectEvent(@NotNull InventoryView transaction,
                int newIndex)  | 
| Modifier and Type | Method and Description | 
|---|---|
static @NotNull HandlerList | 
getHandlerList()  | 
@NotNull HandlerList | 
getHandlers()  | 
int | 
getIndex()
Used to get the index of the trade the player clicked on. 
 | 
@NotNull MerchantInventory | 
getInventory()
Gets the primary Inventory involved in this transaction 
 | 
@NotNull Merchant | 
getMerchant()
Get the Merchant involved. 
 | 
getResult, getWhoClicked, isCancelled, setCancelled, setResultgetView, getViewerscallEvent, getEventName, isAsynchronouspublic TradeSelectEvent(@NotNull @NotNull InventoryView transaction, int newIndex)
public int getIndex()
@NotNull public @NotNull MerchantInventory getInventory()
InventoryEventgetInventory in class InventoryEvent@NotNull public @NotNull Merchant getMerchant()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class InventoryEvent@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2022. All rights reserved.