public class PigZombieAngerEvent extends EntityEvent implements Cancellable
If the event is cancelled, the pig zombie will not be angered.
Event.Result
entity
Constructor and Description |
---|
PigZombieAngerEvent(PigZombie pigZombie,
Entity target,
int newAnger) |
Modifier and Type | Method and Description |
---|---|
PigZombie |
getEntity()
Returns the Entity involved in this event
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
int |
getNewAnger()
Gets the new anger resulting from this event.
|
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 Entity getTarget()
public int getNewAnger()
PigZombie.getAnger()
public void setNewAnger(int newAnger)
newAnger
- the new angerPigZombie.setAnger(int)
@NotNull public 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 HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.