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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanabortTeleportRequest(@Nullable Resident resident) Aborts the current active teleport request for the given resident.static booleanabortTeleportRequest(@Nullable Resident resident, CancelledTownyTeleportEvent.CancelledTeleportReason reason) Aborts the current active teleport request for the given resident.static TeleportRequestgetTeleportRequest(@NotNull Resident resident) static booleanhasTeleportRequest(@NotNull Resident resident) static voidrequestTeleport(@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 voidrequestTeleport(Resident resident, org.bukkit.Location spawnLoc) static voidrequestTeleport(Resident resident, org.bukkit.Location spawnLoc, int cooldown) voidrun()
-
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
-