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, boolean dismounted, 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
Gets if the player will be dismounted in this teleportation.Methods 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
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerTeleportEvent
-
PlayerTeleportEvent
-
PlayerTeleportEvent
-
-
Method Details
-
getCause
Gets the cause of this teleportation event- Returns:
- Cause of the event
-
willDismountPlayer
Gets 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
-