Class TaskUtils

java.lang.Object
valorless.rarespawns.task.TaskUtils

public class TaskUtils extends Object
Bukkit task utilities.

Provides helpers to query and cancel scheduled tasks by their scheduler ID.

  • 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