Class PlayerSetSpawnPointEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerSetSpawnPointEvent
Called when a player updates a spawn point. Usually this only affects his own,
personal spawn points (primary, secondary), except when changing the default
spawn point via command (this affects all players).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
long
If the spawn point was previously tied to an object (e.g a tent or bed), this is the global object ID of this object.Gets the previously set spawn position for this type (if any was set).Gets the previously set spawn rotation for this type (if any was set).Gets the type of the spawn point the player changes/updates.void
setNewSpawnName
(String name) void
setNewSpawnPosition
(Vector3f position) void
setNewSpawnRotation
(Quaternion rotation) Methods inherited from class net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Method Details
-
getSpawnType
Gets the type of the spawn point the player changes/updates.- Returns:
- the respawn point type.
-
getOldSpawnPosition
Gets the previously set spawn position for this type (if any was set).- Returns:
- the previously set spawn position for this type, or null if this spawn type wasn't set before.
-
getNewSpawnPosition
-
setNewSpawnPosition
-
getOldSpawnRotation
Gets the previously set spawn rotation for this type (if any was set).- Returns:
- the previously set spawn rotation for this type, or null if this spawn type wasn't set before.
-
getNewSpawnRotation
-
setNewSpawnRotation
-
getOldSpawnName
-
getNewSpawnName
-
setNewSpawnName
-
getOldRelatedObjectID
public long getOldRelatedObjectID()If the spawn point was previously tied to an object (e.g a tent or bed), this is the global object ID of this object. Else it's -1- Returns:
- the previous object global ID, or -1 if the spawn wasn't tied to an object before.
-
getNewRelatedObjectID
public long getNewRelatedObjectID()
-