add function isCurrentlyRunning(int taskId);

returns if the given task is currently running.

By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-02-14 15:31:21 +11:00
parent 3274723ced
commit 7cefb730d7

View file

@ -104,4 +104,18 @@ public interface BukkitScheduler {
*/
public void cancelAllTasks();
/**
* Is the task currently running.
*
* A repeating task might not be running currently, but will be running in the future.
* A task that has finished, and does not repeat, will not be running ever again.
*
* Explicitly, a task is running if there exists a thread for it, and that thread is alive.
*
* @param taskId the task to check.
*
* @return if the task is currently running.
*/
public boolean isCurrentlyRunning(int taskId);
}