PlayerTeleportEvent
Documentation for the PlayerTeleportEvent event in the Irminsul game server API
PlayerTeleportEvent is a cancellabe event fired when a player teleports from one location to another for any reason
boolean, inherited
Whether this event has been cancelled
final io.irminsul.common.game.player.Player
The player teleporting. Guaranteed non-null.
final int
The ID of the scene the player is teleporting from. May be zero (none) if the player is first logging in.
int
The ID of the scene the player is teleporting to. Must not be zero.
If toScene has a value of zero, the teleport will not be processed, and a warning will be generated in the server console.
An invalid scene ID can crash the client! Be careful.
final io.irminsul.common.game.world.Position
The position the player is teleporting from. May be null if the player is first logging in.
io.irminsul.common.game.world.Position
The position the player is teleporting to. Must not be null.
This position should not be the same as fromPos. If your intention is to cancel the event, the proper way to do this is via setCancelled(true).
int
The reason for the teleport. Some common values include:
TRANS_POINT: 42 (Teleport Waypoint, Statue of the Seven, Domain, Abyss island, etc.)