Class PlayerWarpTeleportEvent

java.lang.Object
org.bukkit.event.Event
com.olziedev.playerwarps.api.events.WarpEvent
com.olziedev.playerwarps.api.events.warp.PlayerWarpTeleportEvent
All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
PlayerWarpPreTeleportEvent

public class PlayerWarpTeleportEvent extends WarpEvent
Event that is triggered before a player teleports to a warp.
  • Constructor Details

    • PlayerWarpTeleportEvent

      public PlayerWarpTeleportEvent(Warp playerWarp, WLocation teleportLocation, Player teleporter, PlayerWarpTeleportEvent.Cause cause)
      This event is triggered before a player teleports to a warp.
      Parameters:
      playerWarp - The warp instance that is being teleported to.
      teleportLocation - The location the player will be teleported to.
      teleporter - The player that is teleporting.
      cause - The cause will trigger the warp removal.
  • Method Details

    • getHandlerList

      public static HandlerList getHandlerList()
    • getHandlers

      @Nonnull public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getPlayerWarp

      public Warp getPlayerWarp()
      Returns:
      The warp instance that is being teleported to.
    • getTeleportLocation

      public WLocation getTeleportLocation()
      Returns:
      The location the player will be teleported to.
    • setTeleportLocation

      public void setTeleportLocation(WLocation teleportLocation)
      Sets the location the player will be teleported to.
      Parameters:
      teleportLocation - The location the player will be teleported to.
    • getTeleporter

      public Player getTeleporter()
      Returns:
      The player that is teleporting.
    • getCause

      public PlayerWarpTeleportEvent.Cause getCause()
      Returns:
      The cause will trigger the warp removal.