Package net.ess3.api.events.teleport
Class TeleportWarmupEvent
java.lang.Object
org.bukkit.event.Event
net.ess3.api.events.teleport.TeleportEvent
net.ess3.api.events.teleport.TeleportWarmupEvent
- All Implemented Interfaces:
Cancellable
Called when a command starts a player's teleport warmup.
Cancelling this event will prevent the user from teleporting, and any previously pending teleport will commence rather than being cancelled.
To skip the warmup delay, see setDelay(double)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionTeleportWarmupEvent
(IUser teleporter, IUser teleportee, PlayerTeleportEvent.TeleportCause cause, ITarget target, double delay) TeleportWarmupEvent
(IUser teleportee, PlayerTeleportEvent.TeleportCause cause, ITarget target, double delay) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getDelay()
static HandlerList
void
setDelay
(double delay) Methods inherited from class net.ess3.api.events.teleport.TeleportEvent
getTarget, getTeleportCause, getTeleportee, getTeleporter, isCancelled, setCancelled
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
TeleportWarmupEvent
public TeleportWarmupEvent(IUser teleporter, IUser teleportee, PlayerTeleportEvent.TeleportCause cause, ITarget target, double delay) -
TeleportWarmupEvent
public TeleportWarmupEvent(IUser teleportee, PlayerTeleportEvent.TeleportCause cause, ITarget target, double delay)
-
-
Method Details
-
getHandlerList
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getDelay
public double getDelay()- Returns:
- The warmup delay, in seconds.
-
setDelay
public void setDelay(double delay) - Parameters:
delay
- The warmup delay, in seconds. Set this to 0 to skip the warmup delay.
-