public class PlayerInventoryToChestEvent extends PlayerEvent implements Cancellable
| Constructor and Description |
|---|
PlayerInventoryToChestEvent(Player player,
Item originItem,
Item exchangeItem,
int amount,
int inventorySlot,
Inventory.SlotType inventorySlotType,
int chestID,
int chestSlot) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAmount()
Gets the amount of items that will be moved to the chest.
|
int |
getChestID()
Gets the ID of the target chest.
|
int |
getChestSlot()
Gets the item slot in the target chest.
|
Item |
getExchangeItem()
Gets the item this item will be exchanged with, i.e. when the player
exchanges a chest item with an inventory item (the chest item will be moved to
the inventory, and the inventory item will be moved to the chest).
|
int |
getInventorySlot()
Gets the inventory slot (where the item was moved from).
|
Inventory.SlotType |
getInventorySlotType()
Gets the inventory slot type (e.g. quickslot, equipment etc).
|
Item |
getItem()
Gets the item the player tries to move to the chest.
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
getPlayerpublic PlayerInventoryToChestEvent(Player player, Item originItem, Item exchangeItem, int amount, int inventorySlot, Inventory.SlotType inventorySlotType, int chestID, int chestSlot)
public int getAmount()
public Item getItem()
public Item getExchangeItem()
public int getInventorySlot()
public Inventory.SlotType getInventorySlotType()
public int getChestID()
public int getChestSlot()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - set to true if you want to cancel this event.