public class LivingEntityUseItemEvent extends LivingEvent
Modifier and Type | Class and Description |
---|---|
static class |
LivingEntityUseItemEvent.Finish
Fired after an item has fully finished being used.
|
static class |
LivingEntityUseItemEvent.Start
Fired when a player starts 'using' an item, typically when they hold right mouse.
|
static class |
LivingEntityUseItemEvent.Stop
Fired when a player stops using an item without the use duration timing out.
|
static class |
LivingEntityUseItemEvent.Tick
Fired every tick that a player is 'using' an item, see
LivingEntityUseItemEvent.Start for info. |
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private int |
duration |
private ItemStack |
item |
Modifier | Constructor and Description |
---|---|
private |
LivingEntityUseItemEvent(LivingEntity entity,
ItemStack item,
int duration) |
Modifier and Type | Method and Description |
---|---|
int |
getDuration() |
ItemStack |
getItem() |
void |
setDuration(int duration) |
getEntityLiving
getEntity
private final ItemStack item
private int duration
private LivingEntityUseItemEvent(LivingEntity entity, @Nonnull ItemStack item, int duration)
@Nonnull public ItemStack getItem()
public int getDuration()
public void setDuration(int duration)