Class TeleportWarmupTimerTask
java.lang.Object
com.palmergames.bukkit.towny.tasks.TownyTimerTask
com.palmergames.bukkit.towny.tasks.TeleportWarmupTimerTask
- All Implemented Interfaces:
Runnable
- Author:
- dumptruckman
-
Field Summary
Fields inherited from class com.palmergames.bukkit.towny.tasks.TownyTimerTask
plugin, universe
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
abortTeleportRequest
(@Nullable Resident resident) Aborts the current active teleport request for the given resident.static boolean
abortTeleportRequest
(@Nullable Resident resident, CancelledTownyTeleportEvent.CancelledTeleportReason reason) Aborts the current active teleport request for the given resident.static TeleportRequest
getTeleportRequest
(@NotNull Resident resident) static boolean
hasTeleportRequest
(@NotNull Resident resident) static void
requestTeleport
(@NotNull Resident resident, @NotNull org.bukkit.Location destination, int cooldown, @Nullable Account teleportAccount, double teleportCost) This does not refund any other teleport requests that might be active for the resident, useabortTeleportRequest(Resident)
first if you want them to be refunded.static void
requestTeleport
(Resident resident, org.bukkit.Location spawnLoc) static void
requestTeleport
(Resident resident, org.bukkit.Location spawnLoc, int cooldown) void
run()
-
Constructor Details
-
TeleportWarmupTimerTask
-
-
Method Details
-
run
public void run() -
requestTeleport
-
requestTeleport
-
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, useabortTeleportRequest(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
-
getTeleportRequest
-