Class PlayerChangeObjectStatusEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.world.PlayerObjectEvent
net.risingworld.api.events.player.world.PlayerChangeObjectStatusEvent
- All Implemented Interfaces:
Cancellable
Called when the player changes the status of an object. For example, when someone opens a
door (usually status 0 == closed, status 1 == opened), or turns on a furnace etc.
Example: If a player opens a door, an explosion will be triggered
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
Gets the new object status.Gets the object element.byte
void
setNewStatus
(byte status) Sets the new object status.Methods inherited from class net.risingworld.api.events.player.world.PlayerObjectEvent
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalID, getObjectDefinition, getTypeID, isCancelled, setCancelled
Methods inherited from class net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Method Details
-
getOldStatus
public byte getOldStatus() -
getNewStatus
public byte getNewStatus()Gets the new object status.- Returns:
- the new status.
-
setNewStatus
public void setNewStatus(byte status) Sets the new object status.- Parameters:
status
- the new status you want to set.
-
getObject
Description copied from class:PlayerObjectEvent
Gets the object element.- Overrides:
getObject
in classPlayerObjectEvent
- Returns:
- the object element.
-