Package org.bukkit.event.player
Class PlayerTeleportEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerMoveEvent
org.bukkit.event.player.PlayerTeleportEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
PlayerPortalEvent
,PlayerTeleportEndGatewayEvent
Holds information for player teleport events
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerTeleportEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) PlayerTeleportEvent
(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause, Set<@NotNull TeleportFlag.Relative> teleportFlagSet) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Gets the cause of this teleportation eventstatic @NotNull HandlerList
Returns the relative teleportation flags used in this teleportation.boolean
Deprecated, for removal: This API element is subject to removal in a future version.dismounting on tp is no longer controlled by the serverMethods inherited from class org.bukkit.event.player.PlayerMoveEvent
getFrom, getTo, hasChangedBlock, hasChangedOrientation, hasChangedPosition, hasExplicitlyChangedBlock, hasExplicitlyChangedPosition, isCancelled, setCancelled, setFrom, setTo
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
asynchronous, callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerTeleportEvent
-
PlayerTeleportEvent
-
PlayerTeleportEvent
-
-
Method Details
-
getCause
Gets the cause of this teleportation event- Returns:
- Cause of the event
-
willDismountPlayer
Deprecated, for removal: This API element is subject to removal in a future version.dismounting on tp is no longer controlled by the serverGets if the player will be dismounted in this teleportation.- Returns:
- dismounted or not
-
getRelativeTeleportationFlags
Returns the relative teleportation flags used in this teleportation. This determines which axis the player will not lose their velocity in.- Returns:
- an immutable set of relative teleportation flags
-
getHandlers
- Overrides:
getHandlers
in classPlayerMoveEvent
-
getHandlerList
-