Cancellablepublic class PigZombieAngerEvent extends EntityEvent implements Cancellable
If the event is cancelled, the pig zombie will not be angered.
Event.Resultentity| Constructor | Description |
|---|---|
PigZombieAngerEvent(@NotNull PigZombie pigZombie,
@Nullable Entity target,
int newAnger) |
| Modifier and Type | Method | Description |
|---|---|---|
@NotNull PigZombie |
getEntity() |
Returns the Entity involved in this event
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
int |
getNewAnger() |
Gets the new anger resulting from this event.
|
@Nullable Entity |
getTarget() |
Gets the entity (if any) which triggered this anger update.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setNewAnger(int newAnger) |
Sets the new anger resulting from this event.
|
getEntityTypegetEventName, isAsynchronous@Nullable public @Nullable Entity getTarget()
public int getNewAnger()
PigZombie.getAnger()public void setNewAnger(int newAnger)
newAnger - the new angerPigZombie.setAnger(int)@NotNull public @NotNull PigZombie 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 @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.