public class EntityInventorySlotChangeEvent extends Object implements EntityEvent, Cancellable
| Constructor and Description |
|---|
EntityInventorySlotChangeEvent(Entity entity,
ItemInstance oldItem,
ItemInstance newItem,
int slot) |
| Modifier and Type | Method and Description |
|---|---|
Entity |
getEntity() |
ItemInstance |
getNewItem() |
ItemInstance |
getOldItem() |
int |
getSlot() |
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
void |
setNewItem(ItemInstance newItem) |
public EntityInventorySlotChangeEvent(Entity entity, ItemInstance oldItem, ItemInstance newItem, int slot)
public int getSlot()
public ItemInstance getNewItem()
public void setNewItem(ItemInstance newItem)
public ItemInstance getOldItem()
public Entity getEntity()
getEntity in interface EntityEventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.Copyright © 2017–2019 NukkitX. All rights reserved.