Klasse PlayerPlaceObjectEvent
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.PlayerPlaceObjectEvent
- Alle implementierten Schnittstellen:
Cancellable
Called when a player places an objects (furniture, doors, lamps, chests etc).
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
getColor()
long
Gets the info ID of the object.Gets the world position of the object as a Vector3f.Gets the rotation of the object as a Quaternion.getScale()
Gets the scale factor of the object along the x, y and z axis.byte
Gets the current status of the object.void
setColor
(int rgba) void
setPosition
(float x, float y, float z) Changes the object world position.void
setPosition
(Vector3f position) Changes the object world position.void
setRotation
(Quaternion rotation) Changes the object rotation.Von Klasse geerbte Methoden net.risingworld.api.events.player.world.PlayerObjectEvent
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalID, getObject, getObjectDefinition, getTypeID, isCancelled, setCancelled
Von Klasse geerbte Methoden net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Methodendetails
-
getPosition
Gets the world position of the object as a Vector3f.- Gibt zurück:
- the global object position as a Vector3f.
-
getRotation
Gets the rotation of the object as a Quaternion.- Gibt zurück:
- the object rotation as a Quaternion.
-
getScale
Gets the scale factor of the object along the x, y and z axis. By default, it's 1 1 1.- Gibt zurück:
- the object scale factor, as a Vector3f.
-
getColor
public int getColor() -
getStatus
public byte getStatus()Gets the current status of the object. The status is only used by some objects, e.g. doors (usually status 0 == closed, status 1 == opened), chests (status only represents the visual state, like doors), furnaces etc.- Gibt zurück:
- the object status.
-
getInfoID
public long getInfoID()Gets the info ID of the object. For regular objects, the info ID is usually -1 (so it's unused), only objects which hold additional information have an info ID (e.g for a chest, the info ID is the global chest ID, for furnaces, it is the global furnace ID etc).- Gibt zurück:
- the object info ID.
-
setColor
public void setColor(int rgba) -
setPosition
Changes the object world position.- Parameter:
position
- the new object world position.
-
setPosition
public void setPosition(float x, float y, float z) Changes the object world position.- Parameter:
x
- the new object world x position.y
- the new object world y position.z
- the new object world z position.
-
setRotation
Changes the object rotation.- Parameter:
rotation
- the new object rotation. Set to null to reset the rotation (Quaternion.IDENTITY).
-