Class PlayerTeleportEvent

java.lang.Object
com.welcome234.pluginsystem.events.PlayerTeleportEvent

public class PlayerTeleportEvent extends Object
Called when a player teleports
  • Constructor Details

  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the player who has teleported
      Returns:
      Player instance
    • getTeleportCause

      public PlayerTeleportEvent.TeleportCause getTeleportCause()
      Gets the cause of this teleportation
      Returns:
      Teleport cause
    • getTeleportX

      public double getTeleportX()
      Gets the X coordinate the player has teleported to
      Returns:
      X-coordinate
    • getTeleportY

      public double getTeleportY()
      Gets the Y coordinate the player has teleported to
      Returns:
      Y-coordinate
    • getTeleportDimension

      public boolean getTeleportDimension()
      Gets the dimension the player has teleported to
      Returns:
      Dimension (false = Overworld, true = End)
    • isCancelled

      public boolean isCancelled()
      Gets whether this event is cancelled
      Returns:
      Whether cancelled
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancellation status of this event
      Parameters:
      cancelled - Whether cancelled