Class AsyncTeleport

java.lang.Object
com.earth2me.essentials.AsyncTeleport
All Implemented Interfaces:
IAsyncTeleport

public class AsyncTeleport extends Object implements IAsyncTeleport
  • Constructor Details

  • Method Details

    • cooldown

      public void cooldown(boolean check) throws Throwable
      Throws:
      Throwable
    • cooldown

      public boolean cooldown(boolean check, CompletableFuture<Boolean> future)
    • 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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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
    • 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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      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 interface IAsyncTeleport
      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

      public void back(Trade chargeFor, CompletableFuture<Boolean> future)
      Description copied from interface: IAsyncTeleport
      Teleport wrapper used to handle /back teleports
      Specified by:
      back in interface IAsyncTeleport
      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

      public void back(IUser teleporter, Trade chargeFor, CompletableFuture<Boolean> future)
      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 interface IAsyncTeleport
      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

      public void back(CompletableFuture<Boolean> future)
      Description copied from interface: IAsyncTeleport
      Teleport wrapper used to handle throwing user home after a jail sentence
      Specified by:
      back in interface IAsyncTeleport
      Parameters:
      future - - Future which is completed with the success status of the execution
    • setTpType

      public void setTpType(AsyncTeleport.TeleportType tpType)