Class TeleportWarmupTimerTask

java.lang.Object
com.palmergames.bukkit.towny.tasks.TownyTimerTask
com.palmergames.bukkit.towny.tasks.TeleportWarmupTimerTask
All Implemented Interfaces:
Runnable

public class TeleportWarmupTimerTask extends TownyTimerTask
Author:
dumptruckman
  • Constructor Details

    • TeleportWarmupTimerTask

      public TeleportWarmupTimerTask(Towny plugin)
  • Method Details

    • run

      public void run()
    • requestTeleport

      public static void requestTeleport(Resident resident, org.bukkit.Location spawnLoc)
    • requestTeleport

      public static void requestTeleport(Resident resident, org.bukkit.Location spawnLoc, int cooldown)
    • requestTeleport

      public static void requestTeleport(@NotNull @NotNull Resident resident, @NotNull @NotNull org.bukkit.Location destination, int cooldown, @Nullable @Nullable Account teleportAccount, double teleportCost)
      This does not refund any other teleport requests that might be active for the resident, use abortTeleportRequest(Resident) first if you want them to be refunded.
    • abortTeleportRequest

      @Contract("null -> false") public static boolean abortTeleportRequest(@Nullable @Nullable Resident resident)
      Aborts the current active teleport request for the given resident.
      Parameters:
      resident - The resident to abort the request for.
      Returns:
      Whether the resident had an active teleport request.
    • abortTeleportRequest

      @Contract("null -> false") public static boolean abortTeleportRequest(@Nullable @Nullable Resident resident, CancelledTownyTeleportEvent.CancelledTeleportReason reason)
      Aborts the current active teleport request for the given resident.
      Parameters:
      resident - The resident to abort the request for.
      reason - The CancelledSpawnReason this player has had their teleport request cancel.
      Returns:
      Whether the resident had an active teleport request.
    • hasTeleportRequest

      public static boolean hasTeleportRequest(@NotNull @NotNull Resident resident)
    • getTeleportRequest

      public static TeleportRequest getTeleportRequest(@NotNull @NotNull Resident resident)