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 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 up
      cooldown - - If cooldown should be enforced
      cause - - The reported teleportPlayer cause
      future - - 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 up
      cooldown - - If cooldown should be enforced
      cause - - The reported teleportPlayer cause
      future - - Future which is completed with the success status of the execution
    • nowUnsafe

      Used to skip all safety checks while teleporting a player asynchronously.
      Parameters:
      loc - - Where should the player end up
      cause - - The reported teleportPlayer cause
      future - - 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 up
      chargeFor - - What the user will be charged if teleportPlayer is successful
      cause - - 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 up
      chargeFor - - What the user will be charged if teleportPlayer is successful
      cause - - The reported teleportPlayer cause
      future - - 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 teleported
      loc - - Where should the player end up
      chargeFor - - What the user will be charged if teleportPlayer is successful
      cause - - The reported teleportPlayer cause
      future - - 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 teleported
      entity - - Where should the player end up
      chargeFor - - What the user will be charged if teleportPlayer is successful
      cause - - The reported teleportPlayer cause
      future - - 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 successful
      cause - - The reported teleportPlayer cause
      future - - 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 teleported
      warp - - The name of the warp the user will be teleported too.
      chargeFor - - What the user will be charged if teleportPlayer is successful
      cause - - The reported teleportPlayer cause
      future - - Future which is completed with the success status of the execution
    • back

      void back(Trade chargeFor, CompletableFuture<Boolean> future)
      Teleport wrapper used to handle /back teleports
      Parameters:
      chargeFor - - What the user will be charged if teleportPlayer is successful
      future - - Future which is completed with the success status of the execution
    • back

      void 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.
      Parameters:
      teleporter - - The user performing the /back command. This value may be null to indicate console.
      chargeFor - - What the teleporter will be charged if teleportPlayer is successful
      future - - Future which is completed with the success status of the execution
    • back

      void back(CompletableFuture<Boolean> future)
      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