public class PlayerDropItemEvent extends PlayerEvent implements Cancellable
PlayerChestDropEvent will
be triggered instead!PlayerChestDropEvent| Constructor and Description |
|---|
PlayerDropItemEvent(Player player,
Item item,
int amount,
int inventorySlot,
Inventory.SlotType inventorySlotType,
Vector3f position,
Quaternion rotation) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAmount()
Gets the amount (stack size) the player wants to drop from the inventory.
|
int |
getInventorySlot()
Gets the slot in the inventory the item was removed from.
|
Inventory.SlotType |
getInventorySlotType()
Gets the inventory / slot type in the players inventory where the item was removed from.
|
Item |
getItem()
Gets the item the player wants to drop.
|
Vector3f |
getPosition()
Gets the item drop position.
|
Quaternion |
getRotation()
Gets the item drop rotation (rotation of the item).
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
getPlayerpublic PlayerDropItemEvent(Player player, Item item, int amount, int inventorySlot, Inventory.SlotType inventorySlotType, Vector3f position, Quaternion rotation)
public Item getItem()
public int getAmount()
public int getInventorySlot()
public Inventory.SlotType getInventorySlotType()
public Vector3f getPosition()
public Quaternion getRotation()
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.