Class PlayerTeleportEvent

All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
PlayerPortalEvent, PlayerTeleportEndGatewayEvent

public class PlayerTeleportEvent extends PlayerMoveEvent
Holds information for player teleport events
  • Constructor Details

  • Method Details

    • getCause

      @NotNull public @NotNull PlayerTeleportEvent.TeleportCause getCause()
      Gets the cause of this teleportation event
      Returns:
      Cause of the event
    • getRelativeTeleportationFlags

      @NotNull public @NotNull @Unmodifiable Set<TeleportFlag.Relative> 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
    • willDismountPlayer

      @Deprecated(forRemoval=true) @Contract("-> true") public boolean willDismountPlayer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      dismounting on tp is no longer controlled by the server
      Gets if the player will be dismounted in this teleportation.
      Returns:
      dismounted or not
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Overrides:
      getHandlers in class PlayerMoveEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()