Class RtpWarmupStartEvent
java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.rtp.event.RtpWarmupStartEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class RtpWarmupStartEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Fired when an RTP warmup begins.
Adjust the delay with setWarmupSeconds(long), or cancel the event to
skip the warmup entirely.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionRtpWarmupStartEvent(org.bukkit.entity.Player player, org.bukkit.World world, long warmupSeconds) Creates a new RTP warmup start 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 teleporting player.longReturns the warmup delay in seconds.org.bukkit.WorldgetWorld()Returns the world.booleanvoidsetCancelled(boolean cancel) voidsetCancelReason(String cancelReason) Sets why the event is being cancelled.voidsetWarmupSeconds(long warmupSeconds) Overrides the warmup delay.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
RtpWarmupStartEvent
public RtpWarmupStartEvent(org.bukkit.entity.Player player, org.bukkit.World world, long warmupSeconds) Creates a new RTP warmup start event.- Parameters:
player- the teleporting playerworld- the worldwarmupSeconds- the warmup delay in seconds
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the teleporting player.- Returns:
- the player
-
getWorld
public org.bukkit.World getWorld()Returns the world.- Returns:
- the world
-
getWarmupSeconds
public long getWarmupSeconds()Returns the warmup delay in seconds.- Returns:
- warmup seconds
-
setWarmupSeconds
public void setWarmupSeconds(long warmupSeconds) Overrides the warmup delay.- Parameters:
warmupSeconds- the new warmup in seconds
-
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()
-