public class ArrowBodyCountChangeEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor and Description |
---|
ArrowBodyCountChangeEvent(@NotNull LivingEntity entity,
int oldAmount,
int newAmount,
boolean isReset) |
Modifier and Type | Method and Description |
---|---|
@NotNull LivingEntity |
getEntity()
Returns the Entity involved in this event
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull 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
callEvent, getEventName, isAsynchronous
public ArrowBodyCountChangeEvent(@NotNull @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 @NotNull 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 @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.