Package net.essentialsx.api.v2.events
Class TeleportRequestResponseEvent
java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.TeleportRequestResponseEvent
- All Implemented Interfaces:
Cancellable
Called when a player accepts or denies a teleport.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionTeleportRequestResponseEvent
(IUser requestee, IUser requester, IUser.TpaRequest tpaRequest, boolean accept) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
Gets the user who is accepting/denying this teleport request.Gets the user who submitted this teleport request.Gets information about this teleport request.boolean
isAccept()
Whether or not the request has been accepted.boolean
boolean
isDeny()
Whether or not the request has been denied.void
setCancelled
(boolean cancel) Sets whether or not to cancel this teleport request.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TeleportRequestResponseEvent
public TeleportRequestResponseEvent(IUser requestee, IUser requester, IUser.TpaRequest tpaRequest, boolean accept)
-
-
Method Details
-
getRequestee
Gets the user who is accepting/denying this teleport request.- Returns:
- the user accepting/denying the request.
-
getRequester
Gets the user who submitted this teleport request.- Returns:
- the user who sent the request.
-
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 interfaceCancellable
-
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 interfaceCancellable
- Parameters:
cancel
- whether or not to cancel this teleport request.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-