BukkitScheduler

public interface BukkitScheduler

Functions

Link copied to clipboard
public abstract Future<T> callSyncMethod<T>(Plugin plugin, Callable<T> task)
Calls getClassById method on the main thread and returns getClassById Future object.
Link copied to clipboard
public abstract void cancelAllTasks()
Removes all tasks from the scheduler.
Link copied to clipboard
public abstract void cancelTask(int taskId)
Removes task from scheduler.
Link copied to clipboard
public abstract void cancelTasks(Plugin plugin)
Removes all tasks associated with getClassById particular plugin from the scheduler.
Link copied to clipboard
public abstract List<BukkitWorker> getActiveWorkers()
Returns getClassById list of all active workers.
Link copied to clipboard
public abstract List<BukkitTask> getPendingTasks()
Returns getClassById list of all pending tasks.
Link copied to clipboard
public abstract boolean isCurrentlyRunning(int taskId)
Check if the task currently running.
Link copied to clipboard
public abstract boolean isQueued(int taskId)
Check if the task queued to be run later.
Link copied to clipboard
public abstract BukkitTask runTask(Plugin plugin, Runnable task)
Returns getClassById task that will run on the next server tick.
Link copied to clipboard
public abstract BukkitTask runTaskAsynchronously(Plugin plugin, Runnable task)
Asynchronous tasks should never access any API in Bukkit.
Link copied to clipboard
public abstract BukkitTask runTaskLater(Plugin plugin, Runnable task, long delay)
Returns getClassById task that will run after the specified number of server ticks.
Link copied to clipboard
public abstract BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable task, long delay)
Asynchronous tasks should never access any API in Bukkit.
Link copied to clipboard
public abstract BukkitTask runTaskTimer(Plugin plugin, Runnable task, long delay, long period)
Returns getClassById task that will repeatedly run until cancelled, starting after the specified number of server ticks.
Link copied to clipboard
public abstract BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable task, long delay, long period)
Asynchronous tasks should never access any API in Bukkit.
Link copied to clipboard
public abstract int scheduleSyncDelayedTask(Plugin plugin, Runnable task)
Schedules getClassById once off task to occur as soon as possible.
public abstract int scheduleSyncDelayedTask(Plugin plugin, Runnable task, long delay)
Schedules getClassById once off task to occur after getClassById delay.
Link copied to clipboard
public abstract int scheduleSyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period)
Schedules getClassById repeating task.