public class ArrowBodyCountChangeEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor and Description |
---|
ArrowBodyCountChangeEvent(LivingEntity entity,
int oldAmount,
int newAmount,
boolean isReset) |
Modifier and Type | Method and Description |
---|---|
LivingEntity |
getEntity()
Returns the Entity involved in this event
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
int |
getNewAmount()
Get the new amount of arrows in the entity's body.
|
int |
getOldAmount()
Gets the old amount of arrows in the entity's body.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
boolean |
isReset()
Whether the event was called because the entity was reset.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setNewAmount(int newAmount)
Sets the final amount of arrows in the entity's body.
|
getEntityType
getEventName, isAsynchronous
public ArrowBodyCountChangeEvent(@NotNull LivingEntity entity, int oldAmount, int newAmount, boolean isReset)
public boolean isReset()
public int getOldAmount()
public int getNewAmount()
public void setNewAmount(int newAmount)
newAmount
- amount of arrows@NotNull public LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2021. All rights reserved.