Class RtpRequestEvent
java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.rtp.event.RtpRequestEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class RtpRequestEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Fired when an RTP is requested, before cooldown and warmup checks.
Cancelling this event refuses the request. Communicate why via
setCancelReason(String).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionRtpRequestEvent(org.bukkit.entity.Player player, org.bukkit.World world) Creates a new RTP request event. -
Method Summary
Modifier and TypeMethodDescriptionReturns why the event was cancelled, or an empty string if not cancelled.static org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.entity.PlayerReturns the requesting player.org.bukkit.WorldgetWorld()Returns the world the player wants to teleport within.booleanvoidsetCancelled(boolean cancel) voidsetCancelReason(String cancelReason) Sets why the event is being cancelled.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
RtpRequestEvent
public RtpRequestEvent(org.bukkit.entity.Player player, org.bukkit.World world) Creates a new RTP request event.- Parameters:
player- the requesting playerworld- the world the player wants to teleport within
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the requesting player.- Returns:
- the player
-
getWorld
public org.bukkit.World getWorld()Returns the world the player wants to teleport within.- Returns:
- the world
-
getCancelReason
Returns why the event was cancelled, or an empty string if not cancelled.- Returns:
- the cancel reason
-
setCancelReason
Sets why the event is being cancelled.- Parameters:
cancelReason- the cancel reason
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-