Class PlayerChangeObjectInfoEvent
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.PlayerChangeObjectInfoEvent
- All Implemented Interfaces:
Cancellable
Called when the info ID of an object changes. For example, this happens if someone
locks (infoID 1) or unlocks (infoID 0) a door
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the new object info.Gets the object element.long
Gets the old object info.void
setNewInfoID
(long infoID) void
skipValidation
(boolean set) If true, the game no longer checks whether or not the player is allowed to perform this action.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
-
getOldInfoID
public long getOldInfoID()Gets the old object info.- Returns:
- the old info ID.
-
getNewInfoID
public long getNewInfoID()Gets the new object info.- Returns:
- the new info ID.
-
setNewInfoID
public void setNewInfoID(long infoID) -
skipValidation
public void skipValidation(boolean set) If true, the game no longer checks whether or not the player is allowed to perform this action. For example, by default the player is only allowed to lock/unlock doors he owns, but if "skipValidation" is true, the game skips this check- Parameters:
set
- true to skip the checks whether or not the player is actually allowed to perform this action
-
getObject
Description copied from class:PlayerObjectEvent
Gets the object element.- Overrides:
getObject
in classPlayerObjectEvent
- Returns:
- the object element.
-