Class PlayerTeleportOutOfArenaEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerTeleportOutOfArenaEvent
All Implemented Interfaces:
ArenaEvent, Cancellable

public class PlayerTeleportOutOfArenaEvent extends PlayerEvent implements ArenaEvent, Cancellable
Gets called when a player teleports himself out of the arena during a game.

Canceling the event will prevent the player from getting kicked, but will still let him teleport the new location.

  • Constructor Details

  • Method Details

    • getFrom

      public Location getFrom()
      Returns the current location of the player.
      Returns:
      His location before this event fired
    • getTo

      public Location getTo()
      Returns the location to which the player is trying to teleport to.
      Returns:
      His new location
    • setTo

      public void setTo(Location to)
      Set the new location to which the player shall get teleported to.
      Parameters:
      to - His new location
    • getCause

      Returns what caused him to teleport.
      Returns:
      The teleport cause
    • setCancelled

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

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

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()