Cancellable
public class PigZombieAngerEvent extends EntityEvent implements Cancellable
If the event is cancelled, the pig zombie will not be angered.
Event.Result
entity
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.
|
getEntityType
callEvent, getEventName, 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()
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 © 2020. All rights reserved.