Package com.earth2me.essentials.api
Interface IAsyncTeleport
- All Known Implementing Classes:
AsyncTeleport
public interface IAsyncTeleport
Manages EssentialsX's teleport functionality for a player.
Use this if you want to access EssentialsX's async/safe teleport functionality and teleport warmups and cooldowns.
-
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
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.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
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
-
Method Details
-
now
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.- 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
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.- 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
void nowUnsafe(Location loc, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Used to skip all safety checks while teleporting a player asynchronously.- Parameters:
loc
- - Where should the player end upcause
- - The reported teleportPlayer causefuture
- - Future which is completed with the success status of the execution
-
teleport
void teleport(Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific location- 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
void teleport(Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific player- 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
void teleportPlayer(IUser otherUser, Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific location- 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
void teleportPlayer(IUser otherUser, Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport a player to a specific player- 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
void respawn(Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport wrapper used to handle tp fallback on /jail and /home- 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
void warp(IUser otherUser, String warp, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause, CompletableFuture<Boolean> future) Teleport wrapper used to handle /warp teleports- 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
Teleport wrapper used to handle /back teleports- Parameters:
chargeFor
- - What the user will be charged if teleportPlayer is successfulfuture
- - Future which is completed with the success status of the execution
-
back
Teleport wrapper used to handle /back teleports that are executed by a different player with this instance of teleport as a target.- 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
Teleport wrapper used to handle throwing user home after a jail sentence- Parameters:
future
- - Future which is completed with the success status of the execution
-