Class TeleportRequestResponseEvent

java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.TeleportRequestResponseEvent
All Implemented Interfaces:
Cancellable

public class TeleportRequestResponseEvent extends Event implements Cancellable
Called when a player accepts or denies a teleport.
  • Constructor Details

    • TeleportRequestResponseEvent

      public TeleportRequestResponseEvent(IUser requestee, IUser requester, IUser.TpaRequest tpaRequest, boolean accept)
  • Method Details

    • getRequestee

      public IUser getRequestee()
      Gets the user who is accepting/denying this teleport request.
      Returns:
      the user accepting/denying the request.
    • getRequester

      public IUser getRequester()
      Gets the user who submitted this teleport request.
      Returns:
      the user who sent the request.
    • getTpaRequest

      public IUser.TpaRequest getTpaRequest()
      Gets information about this teleport request.
      Returns:
      the IUser.TpaRequest object of this event.
    • isAccept

      public boolean isAccept()
      Whether or not the request has been accepted.
      Returns:
      true if accepted, false if denied.
    • isDeny

      public boolean isDeny()
      Whether or not the request has been denied.
      Returns:
      true if denied, false if accepted.
    • isCancelled

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

      public void setCancelled(boolean cancel)
      Sets whether or not to cancel this teleport request. Note that cancelling this event will not show a message to users about the cancellation.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - whether or not to cancel this teleport request.
    • getHandlers

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

      public static HandlerList getHandlerList()