Class PlayerUpdateStatusEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerUpdateStatusEvent
- All Implemented Interfaces:
- Cancellable
Called when the player status updates (e.g hunger, thirst, temperature etc).
 
 
Example: Prevent hunger and thirst from going under 50 percent 
- 
Nested Class SummaryNested Classes
- 
Field Summary
- 
Method SummaryModifier and TypeMethodDescriptionintGets the new hunger value.intGets the new temperature value.intGets the new thirst value.getType()Gets the update type.booleanDetermines if the event is cancelled.voidsetCancelled(boolean cancel) Cancels this event.voidsetHunger(int hunger) voidsetTemperature(int temperature) voidsetThirst(int thirst) Methods inherited from class net.risingworld.api.events.player.PlayerEventgetPlayer
- 
Method Details- 
getTypeGets the update type. Use this to check if hunger was updated, or thirst, or the player temperature etc.- Returns:
- the update type
 
- 
getHungerpublic int getHunger()Gets the new hunger value. Only provides an updated value if update type is Type.Hunger (seegetType())- Returns:
- the new* hunger value
 
- 
setHungerpublic void setHunger(int hunger) 
- 
getThirstpublic int getThirst()Gets the new thirst value. Only provides an updated value if update type is Type.Thirst (seegetType())- Returns:
- the new* thirst value
 
- 
setThirstpublic void setThirst(int thirst) 
- 
getTemperaturepublic int getTemperature()Gets the new temperature value. Only provides an updated value if update type is Type.Temperature (seegetType())- Returns:
- the new* temperature value
 
- 
setTemperaturepublic void setTemperature(int temperature) 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableDetermines if the event is cancelled. If an event is cancelled, it will no longer be executed, but other plugins will still receive the event.
 Please note: If the event is threaded, cancellation has no effect, i.e the event will still be executed.- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if the event is cancelled, or false if not.
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableCancels this event. This means it will no longer be executed, but other plugins will still receive the event.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- set to true if you want to cancel this event.
- Example: Cancel "PlayerEnterAreaEvent", i.e prevent player from entering an area
 
 
-