public class EntityExhaustionEvent extends EntityEvent implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
EntityExhaustionEvent.ExhaustionReason
The reason for why a PlayerExhaustionEvent takes place
|
Event.Result
entity
Constructor and Description |
---|
EntityExhaustionEvent(HumanEntity who,
EntityExhaustionEvent.ExhaustionReason exhaustionReason,
float exhaustion) |
Modifier and Type | Method and Description |
---|---|
HumanEntity |
getEntity()
Returns the Entity involved in this event
|
float |
getExhaustion()
Get the amount of exhaustion to add to the player's current exhaustion.
|
EntityExhaustionEvent.ExhaustionReason |
getExhaustionReason()
Gets the
EntityExhaustionEvent.ExhaustionReason for this event |
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setExhaustion(float exhaustion)
Set the exhaustion to apply to the player.
|
getEntityType
getEventName, isAsynchronous
public EntityExhaustionEvent(@NotNull HumanEntity who, @NotNull EntityExhaustionEvent.ExhaustionReason exhaustionReason, float exhaustion)
@NotNull public EntityExhaustionEvent.ExhaustionReason getExhaustionReason()
EntityExhaustionEvent.ExhaustionReason
for this eventpublic float getExhaustion()
public void setExhaustion(float exhaustion)
exhaustion
- new exhaustion to add@NotNull public HumanEntity 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 © 2021. All rights reserved.