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(@NotNull HumanEntity who,
                     @NotNull EntityExhaustionEvent.ExhaustionReason exhaustionReason,
                     float exhaustion)  | 
| Modifier and Type | Method and Description | 
|---|---|
@NotNull HumanEntity | 
getEntity()
Returns the Entity involved in this event 
 | 
float | 
getExhaustion()
Get the amount of exhaustion to add to the player's current exhaustion. 
 | 
@NotNull EntityExhaustionEvent.ExhaustionReason | 
getExhaustionReason()
Gets the  
EntityExhaustionEvent.ExhaustionReason for this event | 
static @NotNull HandlerList | 
getHandlerList()  | 
@NotNull 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. 
 | 
getEntityTypecallEvent, getEventName, isAsynchronouspublic EntityExhaustionEvent(@NotNull @NotNull HumanEntity who, @NotNull @NotNull EntityExhaustionEvent.ExhaustionReason exhaustionReason, float exhaustion)
@NotNull public @NotNull EntityExhaustionEvent.ExhaustionReason getExhaustionReason()
EntityExhaustionEvent.ExhaustionReason for this eventpublic float getExhaustion()
public void setExhaustion(float exhaustion)
exhaustion - new exhaustion to add@NotNull public @NotNull 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 @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2022. All rights reserved.