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.Resultentity| 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.
|
getEntityTypegetEventName, isAsynchronouspublic 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()
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 HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.