Cancellablepublic 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 | Description |
|---|---|
TradeSelectEvent(InventoryView transaction,
int newIndex) |
| Modifier and Type | Method | Description |
|---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
int |
getIndex() |
Used to get the index of the trade the player clicked on.
|
MerchantInventory |
getInventory() |
Gets the primary Inventory involved in this transaction
|
Merchant |
getMerchant() |
Get the Merchant involved.
|
getEventName, isAsynchronousgetView, getViewersgetResult, getWhoClicked, isCancelled, setCancelled, setResultpublic TradeSelectEvent(@NotNull
InventoryView transaction,
int newIndex)
public int getIndex()
@NotNull public MerchantInventory getInventory()
InventoryEventgetInventory in class InventoryEvent@NotNull public Merchant getMerchant()
@NotNull public HandlerList getHandlers()
getHandlers in class InventoryEvent@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.