Cancellablepublic class ArrowBodyCountChangeEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor | Description |
|---|---|
ArrowBodyCountChangeEvent(LivingEntity entity,
int oldAmount,
int newAmount,
boolean isReset) |
| Modifier and Type | Method | 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.
|
getEntityTypecallEvent, getEventName, isAsynchronouspublic 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()
EntityEventgetEntity in class EntityEventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - 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.