Class TeleportEvent

java.lang.Object
org.bukkit.event.Event
net.ess3.api.events.teleport.TeleportEvent
All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
PreTeleportEvent, TeleportWarmupEvent

public abstract class TeleportEvent extends Event implements Cancellable
Abstract class for various teleport events. You should listen to PreTeleportEvent or TeleportWarmupEvent depending on your needs.
  • Method Details

    • getTeleporter

      public IUser getTeleporter()
      Returns:
      The user that initiated the teleportation, or null if unknown
    • getTeleportee

      public IUser getTeleportee()
      Returns:
      The user to be teleported
    • getTeleportCause

      public PlayerTeleportEvent.TeleportCause getTeleportCause()
      Returns:
      The reason for teleportation
    • getTarget

      public ITarget getTarget()
      Returns:
      The target to teleport to, or null if unknown at this stage (such as a forced respawn)
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean b)
      Specified by:
      setCancelled in interface Cancellable