Index

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

P

P - Enum constant in enum class net.risingworld.api.utils.Key
 
P2PClient - Enum constant in enum class net.risingworld.api.Server.Type
P2P session as client
P2PHost - Enum constant in enum class net.risingworld.api.Server.Type
P2P session as host
paddingBottom - Variable in class net.risingworld.api.ui.style.Style
Sets reserved space for the bottom edge of the padding
PaddingBox - Enum constant in enum class net.risingworld.api.ui.style.OverflowClipBox
Default: Clip element against the box outside the padding area but inside the borders
paddingLeft - Variable in class net.risingworld.api.ui.style.Style
Sets reserved space for the left edge of the padding
paddingRight - Variable in class net.risingworld.api.ui.style.Style
Sets reserved space for the right edge of the padding
paddingTop - Variable in class net.risingworld.api.ui.style.Style
Sets reserved space for the top edge of the padding
Paddles - Enum constant in enum class net.risingworld.api.definitions.Crafting.SubCategory
 
PageDown - Enum constant in enum class net.risingworld.api.utils.Key
 
PageUp - Enum constant in enum class net.risingworld.api.utils.Key
 
Paint - Enum constant in enum class net.risingworld.api.definitions.Items.Type
This item is used to paint elements in the world
paintable - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Can the user paint this object?
Pane - Enum constant in enum class net.risingworld.api.definitions.Constructions.ShapeType
 
Pants - Enum constant in enum class net.risingworld.api.definitions.Crafting.SubCategory
 
Paper - Enum constant in enum class net.risingworld.api.definitions.Items.Material
 
Paper - Enum constant in enum class net.risingworld.api.definitions.Objects.Material
 
PaperPress - Enum constant in enum class net.risingworld.api.definitions.Objects.Type
 
paragraphSpacing - Variable in class net.risingworld.api.ui.style.Style
Sets the space between paragraphs (for text / labels)
parent - Variable in class net.risingworld.api.definitions.Crafting.Recipe
Optional parent recipe (in this case, this recipe is a variant / subrecipe of the parent)
parse(String) - Method in enum class net.risingworld.api.utils.Key
 
parse(String) - Method in enum class net.risingworld.api.utils.MouseButton
 
parseBoolean(String, boolean) - Static method in class net.risingworld.api.utils.Utils.StringUtils
Tries to parse a boolean from a string.
parseFloat(String, float) - Static method in class net.risingworld.api.utils.Utils.StringUtils
Tries to parse a float value from a string.
parseInteger(String, int) - Static method in class net.risingworld.api.utils.Utils.StringUtils
Tries to parse an integer value from a string.
pause() - Method in class net.risingworld.api.Timer
Pauses this timer.
Pause - Enum constant in enum class net.risingworld.api.utils.Key
 
pedestal - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Base / pedestal of the object (i.e it's foundation or stand)
Pelt - Enum constant in enum class net.risingworld.api.definitions.Items.Category
 
Pelt - Enum constant in enum class net.risingworld.api.definitions.Items.Group
 
Pelt - Enum constant in enum class net.risingworld.api.definitions.Items.Type
Pelt / hide (can be processed at a tanning rack)
penetration - Variable in class net.risingworld.api.definitions.Items.ProjectileDefinition
Penetration factor (max "thickness" in blocks projectile can pass through)
Percent - Enum constant in enum class net.risingworld.api.ui.style.Unit
Percentage value
Period - Enum constant in enum class net.risingworld.api.utils.Key
 
PersistentDynamic - Enum constant in enum class net.risingworld.api.objects.WorldItem.WorldItemType
 
PersistentStatic - Enum constant in enum class net.risingworld.api.objects.WorldItem.WorldItemType
 
PI - Static variable in class net.risingworld.api.utils.Utils.MathUtils
PI value as a float (180 degrees)
Piano - Enum constant in enum class net.risingworld.api.definitions.Objects.Type
 
Piano - Enum constant in enum class net.risingworld.api.objects.Player.State
Player is playing a piano
pickingInfo - Variable in class net.risingworld.api.definitions.Items.ItemDefinition
Picking info for this item.
Pickup - Enum constant in enum class net.risingworld.api.events.player.inventory.PlayerInventoryAddItemEvent.Origin
Regular item pickup, i.e item was picked up from ground
Pickup - Enum constant in enum class net.risingworld.api.utils.Crosshair
Pickup crosshair (small hand icon)
pickupable - Variable in class net.risingworld.api.definitions.Items.ProjectileDefinition
If true, this projectile can be picked up again after hitting a target (requires itemname to be set)
pickupable - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Can this object be picked up?
pickupitem - Variable in class net.risingworld.api.definitions.Plants.PlantDefinition
If plant can be picked up, this is the item the player gets
pickupitemcount - Variable in class net.risingworld.api.definitions.Plants.PlantDefinition
Determines number of items player get when picking up the plant (if that's possible at all)
pickuprestplant - Variable in class net.risingworld.api.definitions.Plants.PlantDefinition
If player can pick up this plant, this is the name of the plant that remains
Pivot - Enum Class in net.risingworld.api.ui.style
 
pivotasset - Variable in class net.risingworld.api.definitions.Constructions.ConstructionDefinition
 
pivotasset - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Path to the pivot asset.
pivotaxisflip - Variable in class net.risingworld.api.definitions.Constructions.ConstructionDefinition
 
pivotincluderotation - Variable in class net.risingworld.api.definitions.Constructions.ConstructionDefinition
Determines if the current element rotation should be taken into account when looking for the most suitable world pivot (in auto mode)
pivotsnapping - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
 
Pixel - Enum constant in enum class net.risingworld.api.ui.style.Font
 
Pixel - Enum constant in enum class net.risingworld.api.ui.style.Unit
Pixel value
placeableunderwater - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Determines whether or not this element can be placed underwater
placeanywhere - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
If true, this object can be placed anywhere (i.e on all objects, irrespective if they're a "placetarget")
placesound - Variable in class net.risingworld.api.definitions.Items.ItemDefinition
Item place sound.
placesound - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Place sound
placesound - Variable in class net.risingworld.api.definitions.Plants.PlantDefinition
Place sound
PlaceTargets - Enum constant in enum class net.risingworld.api.definitions.Objects.PivotSnapping
 
placetime - Variable in class net.risingworld.api.definitions.Objects.ObjectDefinition
Duration how long it takes to place this element (in seconds)
Plane - Static variable in class net.risingworld.api.assets.ModelAsset
A quad with a size of 1x1, facing upwards (y)
Plant - Class in net.risingworld.api.objects.world
Represents a plant which was planted in the world (or spawned naturally).
Plant - Enum constant in enum class net.risingworld.api.definitions.Items.Material
 
Plant - Enum constant in enum class net.risingworld.api.definitions.Items.Type
Placeable vegetation item (e.g saplings)
Plant - Enum constant in enum class net.risingworld.api.definitions.Objects.Material
 
Plant - Enum constant in enum class net.risingworld.api.definitions.Plants.Type
 
Plant.Flags - Enum Class in net.risingworld.api.objects.world
 
PlantGrowthEvent - Class in net.risingworld.api.events.world
Called when a plant grows (i.e transition to next growth stage).
Note: Most growable plants have multiple "growth stages", so a sapling usually never turns into a fully grown plant directly.
PlantInfo - Class in net.risingworld.api.world.generator
Holds data about a plant.
PlantInfo() - Constructor for class net.risingworld.api.world.generator.PlantInfo
 
Plants - Class in net.risingworld.api.definitions
Use the Definitions class to get a definition.
Plants - Enum constant in enum class net.risingworld.api.definitions.Plants.Category
 
Plants.Category - Enum Class in net.risingworld.api.definitions
 
Plants.Extent - Enum Class in net.risingworld.api.definitions
Plant approximate size / extents
Plants.PlantDefinition - Class in net.risingworld.api.definitions
 
Plants.Size - Enum Class in net.risingworld.api.definitions
 
Plants.Stage - Enum Class in net.risingworld.api.definitions
 
Plants.TerrainMaterialType - Enum Class in net.risingworld.api.definitions
 
Plants.Type - Enum Class in net.risingworld.api.definitions
Plant type
PlantSaplings - Enum constant in enum class net.risingworld.api.definitions.Plants.Category
 
Plaster - Enum constant in enum class net.risingworld.api.definitions.Constructions.BlockType
 
Plaster - Enum constant in enum class net.risingworld.api.definitions.Crafting.SubCategory
 
Plastic - Enum constant in enum class net.risingworld.api.definitions.Items.Material
 
Plastic - Enum constant in enum class net.risingworld.api.definitions.Objects.Material
 
Platform - Enum Class in net.risingworld.api.utils
Gets the current platform, or more precisely, the type of the version (e.g whether it's a standalone version or a Steam version etc)
playAnimatorState(String, String, int, float) - Method in class net.risingworld.api.worldelements.Prefab
 
Player - Class in net.risingworld.api.objects
Represents a player.
Player.State - Enum Class in net.risingworld.api.objects
 
PlayerBanEvent - Class in net.risingworld.api.events.player
Called when a player gets banned.
PlayerChangeBlockPositionEvent - Class in net.risingworld.api.events.player
Called when a player changes his block position (for example by moving).
PlayerChangeConstructionColorEvent - Class in net.risingworld.api.events.player.world
Called when a player paints a construction element.
PlayerChangeEquippedItemEvent - Class in net.risingworld.api.events.player
Called when a player changes the equipped item.
PlayerChangeGameModeEvent - Class in net.risingworld.api.events.player
Called when a player changes his local game mode (i.e by using the command "setgamemode" or "gm").
PlayerChangeObjectColorEvent - Class in net.risingworld.api.events.player.world
Called when a player paints an object (i.e changes the color of an object element, e.g furniture, doors etc).
PlayerChangeObjectInfoEvent - Class in net.risingworld.api.events.player.world
Called when the info ID of an object changes.
PlayerChangeObjectStatusEvent - Class in net.risingworld.api.events.player.world
Called when the status of an object changes.
PlayerChangePositionEvent - Class in net.risingworld.api.events.player
Called when a player changes his position (for example by moving).
PlayerChangeScreenResolutionEvent - Class in net.risingworld.api.events.player.ui
Called when a player changes his ingame screen resolution.
PlayerChangeStateEvent - Class in net.risingworld.api.events.player
Called when a player changes this state.
PlayerChatEvent - Class in net.risingworld.api.events.player
Called when a player sends a chat message.
PlayerCommandEvent - Class in net.risingworld.api.events.player
Called when a player enters a command into chat.
PlayerConnectEvent - Class in net.risingworld.api.events.player
Called when a player connects to the server.
PlayerConstructionEvent - Class in net.risingworld.api.events.player.world
Base class for any kind of interactions (destroy, pickup, use etc) with construction elements (planks, beams, windows, posters etc).
PlayerConstructionEvent(long) - Constructor for class net.risingworld.api.events.player.world.PlayerConstructionEvent
 
PlayerConsumeItemEvent - Class in net.risingworld.api.events.player
Called when a player consumes an item, e.g eats an apple.
PlayerCraftItemEvent - Class in net.risingworld.api.events.player
Called when the player crafts an item.
PlayerCreateAreaEvent - Class in net.risingworld.api.events.player
Called when a player creates a new area (create mode F9 tools).
PlayerCreateBlueprintEvent - Class in net.risingworld.api.events.player
Called when a player wants to create a new blueprint (i.e when he has already selected an area and wants to finally create the blueprint).
PlayerCreativePlaceVegetationEvent - Class in net.risingworld.api.events.player.world
Called when a player uses the creative placement tools (F6) to place vegetations.
PlayerCreativeRemoveConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player uses the creative removal tools (F7) to remove a construction element.
PlayerCreativeRemoveObjectEvent - Class in net.risingworld.api.events.player.world
Called when a player uses the creative removal tools (F7) to remove an object (e.g furniture).
PlayerCreativeRemoveVegetationEvent - Class in net.risingworld.api.events.player.world
Called when a player uses the creative removal tools (F7) to remove a plant.
PlayerCreativeTerrainEditEvent - Class in net.risingworld.api.events.player.world
Called when a player uses the creative terrain edit tools (F5) to edit the terrain (e.g remove, place, smooth etc).
PlayerCreativeTerrainEditEvent.EditMode - Enum Class in net.risingworld.api.events.player.world
 
PlayerDamageEvent - Class in net.risingworld.api.events.player
Called when a player takes damage (e.g fall damage).
PlayerDamageEvent.Cause - Enum Class in net.risingworld.api.events.player
Determines why the PlayerDamageEvent was triggered exactly (i.e what's causing the damage).
PlayerDeathEvent - Class in net.risingworld.api.events.player
Called when a player dies.
PlayerDeathEvent.Cause - Enum Class in net.risingworld.api.events.player
Determines why the PlayerDeathEvent was triggered exactly (i.e what killed this player).
PlayerDestroyConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player destroys a construction element.
PlayerDestroyObjectEvent - Class in net.risingworld.api.events.player.world
Called when a player destroys an object (furniture, doors, lamps etc).
PlayerDestroyTerrainEvent - Class in net.risingworld.api.events.player.world
 
PlayerDestroyVegetationEvent - Class in net.risingworld.api.events.player.world
Called when a player destroys a plant (e.g cuts a tree).
PlayerDisconnectEvent - Class in net.risingworld.api.events.player
Called when a player disconnects.
PlayerDismountNpcEvent - Class in net.risingworld.api.events.player
Called when a player dismounts an npc / animal (e.g a horse).
PlayerDrinkWaterEvent - Class in net.risingworld.api.events.player
Called when a player drinks water from a pond.
PlayerDropItemEvent - Class in net.risingworld.api.events.player
Called when the player drops an item.
PlayerDropItemFromStorageEvent - Class in net.risingworld.api.events.player
Called when a player drops an item from a storage (e.g a chest).
PlayerEditConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player edits a construction element (e.g changes texture, rotation, position etc).
PlayerElementCollisionEvent - Class in net.risingworld.api.events.player
Deprecated, for removal: This API element is subject to removal in a future version.
Do not use! Use PlayerGameObjectHitEvent instead!
PlayerElementHitEvent - Class in net.risingworld.api.events.player
Deprecated, for removal: This API element is subject to removal in a future version.
Do not use! Use PlayerGameObjectHitEvent instead!
PlayerElementInteractionEvent - Class in net.risingworld.api.events.player
Deprecated, for removal: This API element is subject to removal in a future version.
Do not use! Use PlayerGameObjectHitEvent instead!
PlayerEnterAreaEvent - Class in net.risingworld.api.events.player
Called when a player enters a new Area
PlayerEnterChunkEvent - Class in net.risingworld.api.events.player
Called when a player enters a new chunk.
PlayerEnterSectorEvent - Class in net.risingworld.api.events.player
Called when a player enters a new sector (island sector).
PlayerEnterVehicleEvent - Class in net.risingworld.api.events.player
Called when a player enters a vehicle.
PlayerEnterWorldPartEvent - Class in net.risingworld.api.events.player
Called when a player enters a new worldpart.
PlayerEvent - Class in net.risingworld.api.events.player
Base class for all player events.
PlayerEvent(long) - Constructor for class net.risingworld.api.events.player.PlayerEvent
 
PlayerExitVehicleEvent - Class in net.risingworld.api.events.player
Called when a player exits a vehicle.
PlayerGameObjectHitEvent - Class in net.risingworld.api.events.player
Called when a player hits a game object.
PlayerGameObjectInteractionEvent - Class in net.risingworld.api.events.player
Called when a player interacts (i.e presses the interaction key) with a game object.
PlayerHitConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player hits a construction element (e.g planks, beams, posters etc).
PlayerHitItemEvent - Class in net.risingworld.api.events.player
Called when a player hits a world item
PlayerHitNpcEvent - Class in net.risingworld.api.events.player
Called when a player hits / attacks an npc.
PlayerHitObjectEvent - Class in net.risingworld.api.events.player.world
Called when a player hits an object (e.g furniture, doors, lamps etc).
PlayerHitPlayerEvent - Class in net.risingworld.api.events.player
Called when a player hits / attacks another player.
PlayerHitTerrainEvent - Class in net.risingworld.api.events.player.world
Called when a player hits terrain with a tool (e.g pickaxe).
PlayerHitVegetationEvent - Class in net.risingworld.api.events.player.world
Called when a player hits a plant (e.g a tree, bush, flowers etc).
PlayerHitWaterEvent - Class in net.risingworld.api.events.player.world
Called when a player hits water with a tool (e.g pickaxe).
PlayerIllegalStateEvent - Class in net.risingworld.api.events.player
Triggered when an "illegal state" error occurs for a player.
PlayerInventoryAddItemEvent - Class in net.risingworld.api.events.player.inventory
Called when an item is added to the players inventory.
PlayerInventoryAddItemEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerInventoryAddItemEvent
 
PlayerInventoryAddItemEvent.Origin - Enum Class in net.risingworld.api.events.player.inventory
 
PlayerInventoryItemEditEvent - Class in net.risingworld.api.events.player.inventory
Called when an item in inventory gets modified.
PlayerInventoryItemEditEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerInventoryItemEditEvent
 
PlayerInventoryItemEditEvent.EditType - Enum Class in net.risingworld.api.events.player.inventory
 
PlayerInventoryMoveItemEvent - Class in net.risingworld.api.events.player.inventory
Called when an item in the players inventory is moved to another slot in the inventory.
PlayerInventoryMoveItemEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerInventoryMoveItemEvent
 
PlayerInventoryToStorageEvent - Class in net.risingworld.api.events.player.inventory
Called when an item is moved from the player inventory to a storage (e.g a chest).
PlayerInventoryToStorageEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerInventoryToStorageEvent
 
PlayerKeyEvent - Class in net.risingworld.api.events.player
Called when a player presses or releases a key on his keyboard.
PlayerKickEvent - Class in net.risingworld.api.events.player
Called when a player gets kicked.
PlayerLeaveAreaEvent - Class in net.risingworld.api.events.player
Called when a player leaves an Area
PlayerLocationTickerEvent - Class in net.risingworld.api.events.player
Called when the location ticker text (lower left corner of the screen) of the player changes.
PlayerMountNpcEvent - Class in net.risingworld.api.events.player
Called when a player mounts an npc / animal (e.g a horse).
PlayerMouseButtonEvent - Class in net.risingworld.api.events.player
Called when a player presses or releases a mouse button.
PlayerNpcEvent - Class in net.risingworld.api.events.player
Base class for all player - npc related events.
PlayerNpcEvent(long) - Constructor for class net.risingworld.api.events.player.PlayerNpcEvent
 
PlayerNpcInteractionEvent - Class in net.risingworld.api.events.player
Called when a player interacts (i.e presses the interaction key) with an npc.
PlayerNpcInventoryAccessEvent - Class in net.risingworld.api.events.player
Called when a player accesses the inventory of an npc (when he accesses the saddle bags of a mount, for example).
PlayerObjectEvent - Class in net.risingworld.api.events.player.world
Base class for any kind of interactions (destroy, pickup, use etc) with objects (like furniture, doors, lamps etc).
PlayerObjectEvent(long) - Constructor for class net.risingworld.api.events.player.world.PlayerObjectEvent
 
PlayerObjectInteractionEvent - Class in net.risingworld.api.events.player
Called when a player interacts (i.e presses the interaction key) with a default game object (e.g furniture).
PlayerPermissionGroupChangeEvent - Class in net.risingworld.api.events.player
Called when the permission group of a player changes.
PlayerPickupItemEvent - Class in net.risingworld.api.events.player
Called when the player picks up a world item.
PlayerPlaceBlueprintEvent - Class in net.risingworld.api.events.player.world
Called when a player wants to place a blueprint, i.e a blueprint which was already created previously.
PlayerPlaceConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player places a construction element.
PlayerPlaceGrassEvent - Class in net.risingworld.api.events.player.world
Called when a player replants grass.
PlayerPlaceObjectEvent - Class in net.risingworld.api.events.player.world
Called when a player places an objects (furniture, doors, lamps, chests etc).
PlayerPlaceTerrainEvent - Class in net.risingworld.api.events.player.world
Called when a player places terrain (i.e dirt, stone, gravel etc) in the world.
PlayerPlaceVegetationEvent - Class in net.risingworld.api.events.player.world
Called when the player places a plant (saplings, seedlings etc).
PlayerPlaceVegetationEvent(long) - Constructor for class net.risingworld.api.events.player.world.PlayerPlaceVegetationEvent
 
PlayerPlaceWaterEvent - Class in net.risingworld.api.events.player.world
Called when a player places water in the world.
PlayerPlayerInteractionEvent - Class in net.risingworld.api.events.player
Called when a player interacts (i.e presses the interaction key) with another player.
PlayerPrivateMessageEvent - Class in net.risingworld.api.events.player
Called when a player sends a private message to another player.
PlayerRemoveConstructionEvent - Class in net.risingworld.api.events.player.world
Called when a player removes a construction element without destroying it, i.e.
PlayerRemoveGrassEvent - Class in net.risingworld.api.events.player.world
Called when a player removes/cuts grass.
PlayerRemoveObjectEvent - Class in net.risingworld.api.events.player.world
Called when a player removes an object (furniture, doors, lamps etc) without destroying it (usually this is called when a player deconstructs an object, i.e.
PlayerRemoveVegetationEvent - Class in net.risingworld.api.events.player.world
Called when a player removes a plant without destroying it.
PlayerRemoveWaterEvent - Class in net.risingworld.api.events.player.world
Called when a player removes water.
PlayerRespawnEvent - Class in net.risingworld.api.events.player
Called when a player respawns after death.
Players - Enum constant in enum class net.risingworld.api.database.WorldDatabase.Target
 
PlayerSetSignTextEvent - Class in net.risingworld.api.events.player
 
PlayerSetSpawnPointEvent - Class in net.risingworld.api.events.player
Called when a player updates a spawn point.
PlayerSpawnEvent - Class in net.risingworld.api.events.player
Called when a player spawns after connecting.
PlayerStartFishingEvent - Class in net.risingworld.api.events.player
Called when a player starts fishing.
PlayerStartFlyingEvent - Class in net.risingworld.api.events.player
Called when a player starts flying (F2)
PlayerStopFishingEvent - Class in net.risingworld.api.events.player
Called when a player stops fishing.
PlayerStopFlyingEvent - Class in net.risingworld.api.events.player
Called when a player stops flying (F2)
PlayerStorageAccessEvent - Class in net.risingworld.api.events.player
Called when a player accesses a storage object (e.g a chest).
PlayerStorageMoveItemEvent - Class in net.risingworld.api.events.player.inventory
Called when an item in a storage is moved to another slot in the storage.
PlayerStorageMoveItemEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerStorageMoveItemEvent
 
PlayerStorageToInventoryEvent - Class in net.risingworld.api.events.player.inventory
Called when an item is moved from a storage (e.g a chest) to the player inventory.
PlayerStorageToInventoryEvent(long) - Constructor for class net.risingworld.api.events.player.inventory.PlayerStorageToInventoryEvent
 
PlayerTakeOffClothesEvent - Class in net.risingworld.api.events.player
Called when a player takes off on a garment.
PlayerTeleportEvent - Class in net.risingworld.api.events.player
Called when a player is teleported to another location.
PlayerTeleportEvent.Cause - Enum Class in net.risingworld.api.events.player
Determines what caused the teleportation
PlayerToggleInventoryEvent - Class in net.risingworld.api.events.player.ui
Called when a player opens or closes the inventory
PlayerUIElementClickEvent - Class in net.risingworld.api.events.player.ui
Called when a player clicks on a UI element.
PlayerUIInputTextEvent - Class in net.risingworld.api.events.player.ui
Called when a player enters a text into a textfield, or more precisely, once he either presses enter, or once the textfield loses the focus (i.e the player clicks somewhere else)
PlayerUpdateStatusEvent - Class in net.risingworld.api.events.player
Called when the player status updates (e.g hunger, thirst, temperature etc)
Example: Prevent hunger and thirst from going under 50 percent
1@EventMethod
2public void onPlayerUpdateStatus(PlayerUpdateStatusEvent event){
3 //Check the current status type
4 if(event.getType() == PlayerUpdateStatusEvent.Type.Hunger){
5 int newHunger = event.getHunger();
6 if(newHunger < 50){
7 //Cancel event
8 event.setCancelled(true);
9 }
10 }
11 else if(event.getType() == PlayerUpdateStatusEvent.Type.Thirst){
12 int newThirst = event.getThirst();
13 if(newThirst < 50){
14 //Cancel event
15 event.setCancelled(true);
16 }
17 }
18}