Package com.earth2me.essentials
Class AsyncTeleport
java.lang.Object
com.earth2me.essentials.AsyncTeleport
- All Implemented Interfaces:
IAsyncTeleport
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
back
(Trade chargeFor, CompletableFuture<Boolean> future) Teleport wrapper used to handle /back teleportsvoid
back
(CompletableFuture<Boolean> future) Teleport wrapper used to handle throwing user home after a jail sentencevoid
back
(IUser teleporter, Trade chargeFor, CompletableFuture<Boolean> future) Teleport wrapper used to handle /back teleports that are executed by a different player with this instance of teleport as a target.void
cooldown
(boolean check) boolean
cooldown
(boolean check, CompletableFuture<Boolean> future) void
now
(Player entity, boolean cooldown, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Used to skip teleportPlayer delay when teleporting someone to a location or player.void
now
(Location loc, boolean cooldown, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Used to skip teleportPlayer delay when teleporting someone to a location or player.protected void
nowAsync
(IUser teleportee, ITarget target, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) void
nowUnsafe
(Location loc, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Used to skip all safety checks while teleporting a player asynchronously.void
respawn
(Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport wrapper used to handle tp fallback on /jail and /homevoid
setTpType
(AsyncTeleport.TeleportType tpType) void
teleport
(Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific playervoid
teleport
(Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific locationvoid
teleportPlayer
(IUser otherUser, Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific playervoid
teleportPlayer
(IUser otherUser, Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific locationvoid
warp
(IUser otherUser, String warp, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport wrapper used to handle /warp teleports
-
Constructor Details
-
AsyncTeleport
-
-
Method Details
-
cooldown
- Throws:
Throwable
-
cooldown
-
now
public void now(Location loc, boolean cooldown, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Used to skip teleportPlayer delay when teleporting someone to a location or player.- Specified by:
now
in interfaceIAsyncTeleport
- Parameters:
loc
- - Where should the player end upcooldown
- - If cooldown should be enforcedcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
now
public void now(Player entity, boolean cooldown, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Used to skip teleportPlayer delay when teleporting someone to a location or player.- Specified by:
now
in interfaceIAsyncTeleport
- Parameters:
entity
- - Where should the player end upcooldown
- - If cooldown should be enforcedcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
nowUnsafe
public void nowUnsafe(Location loc, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Used to skip all safety checks while teleporting a player asynchronously.- Specified by:
nowUnsafe
in interfaceIAsyncTeleport
- Parameters:
loc
- - Where should the player end upcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
nowAsync
protected void nowAsync(IUser teleportee, ITarget target, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) -
teleport
public void teleport(Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport a player to a specific location- Specified by:
teleport
in interfaceIAsyncTeleport
- Parameters:
loc
- - Where should the player end upchargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer cause.future
- - Future which is completed with the success status of the execution
-
teleport
public void teleport(Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport a player to a specific player- Specified by:
teleport
in interfaceIAsyncTeleport
- Parameters:
entity
- - Where should the player end upchargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
teleportPlayer
public void teleportPlayer(IUser otherUser, Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport a player to a specific location- Specified by:
teleportPlayer
in interfaceIAsyncTeleport
- Parameters:
otherUser
- - Which user will be teleportedloc
- - Where should the player end upchargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
teleportPlayer
public void teleportPlayer(IUser otherUser, Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport a player to a specific player- Specified by:
teleportPlayer
in interfaceIAsyncTeleport
- Parameters:
otherUser
- - Which user will be teleportedentity
- - Where should the player end upchargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
respawn
public void respawn(Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport wrapper used to handle tp fallback on /jail and /home- Specified by:
respawn
in interfaceIAsyncTeleport
- Parameters:
chargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
warp
public void warp(IUser otherUser, String warp, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Description copied from interface:IAsyncTeleport
Teleport wrapper used to handle /warp teleports- Specified by:
warp
in interfaceIAsyncTeleport
- Parameters:
otherUser
- - Which user will be teleportedwarp
- - The name of the warp the user will be teleported too.chargeFor
- - What the user will be charged if teleportPlayer is successfulcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
back
Description copied from interface:IAsyncTeleport
Teleport wrapper used to handle /back teleports- Specified by:
back
in interfaceIAsyncTeleport
- Parameters:
chargeFor
- - What the user will be charged if teleportPlayer is successfulfuture
- - Future which is completed with the success status of the execution
-
back
Description copied from interface:IAsyncTeleport
Teleport wrapper used to handle /back teleports that are executed by a different player with this instance of teleport as a target.- Specified by:
back
in interfaceIAsyncTeleport
- Parameters:
teleporter
- - The user performing the /back command. This value may benull
to indicate console.chargeFor
- - What theteleporter
will be charged if teleportPlayer is successfulfuture
- - Future which is completed with the success status of the execution
-
back
Description copied from interface:IAsyncTeleport
Teleport wrapper used to handle throwing user home after a jail sentence- Specified by:
back
in interfaceIAsyncTeleport
- Parameters:
future
- - Future which is completed with the success status of the execution
-
setTpType
-