Package valorless.rarespawns.task
Class TaskUtils
java.lang.Object
valorless.rarespawns.task.TaskUtils
Bukkit task utilities.
Provides helpers to query and cancel scheduled tasks by their scheduler ID.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelTask(int task) Cancels a scheduled task by its ID.static booleanisTaskRunning(int taskId) Checks whether a task is currently running or queued on the Bukkit scheduler.
-
Constructor Details
-
TaskUtils
public TaskUtils()
-
-
Method Details
-
isTaskRunning
public static boolean isTaskRunning(int taskId) Checks whether a task is currently running or queued on the Bukkit scheduler.- Parameters:
taskId- the scheduler task ID- Returns:
- true if the task is running or queued; false otherwise
-
cancelTask
public static void cancelTask(int task) Cancels a scheduled task by its ID.- Parameters:
task- the scheduler task ID to cancel
-