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.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Modifier and Type | Field and Description |
|---|---|
private int |
duration |
private ItemStack |
item |
| Modifier | Constructor and Description |
|---|---|
private |
LivingEntityUseItemEvent(EntityLivingBase entity,
ItemStack item,
int duration) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDuration() |
ItemStack |
getItem() |
void |
setDuration(int duration) |
getEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setupprivate final ItemStack item
private int duration
private LivingEntityUseItemEvent(EntityLivingBase entity, @Nonnull ItemStack item, int duration)
@Nonnull public ItemStack getItem()
public int getDuration()
public void setDuration(int duration)