public class WrappedScheduler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
WrappedScheduler.TaskWrapper
Represents a backwards compatible Bukkit task.
|
Constructor and Description |
---|
WrappedScheduler() |
Modifier and Type | Method and Description |
---|---|
static WrappedScheduler.TaskWrapper |
runAsynchronouslyOnce(org.bukkit.plugin.Plugin plugin,
java.lang.Runnable runnable,
long firstDelay)
Schedule a given task for a single asynchronous execution.
|
static WrappedScheduler.TaskWrapper |
runAsynchronouslyRepeat(org.bukkit.plugin.Plugin plugin,
org.bukkit.scheduler.BukkitScheduler scheduler,
java.lang.Runnable runnable,
long firstDelay,
long repeatDelay)
Schedule a given task for asynchronous execution.
|
static WrappedScheduler.TaskWrapper |
runAsynchronouslyRepeat(org.bukkit.plugin.Plugin plugin,
java.lang.Runnable runnable,
long firstDelay,
long repeatDelay)
Schedule a given task for multiple asynchronous executions.
|
public static WrappedScheduler.TaskWrapper runAsynchronouslyOnce(org.bukkit.plugin.Plugin plugin, java.lang.Runnable runnable, long firstDelay)
plugin
- - the owner plugin.runnable
- - the task to run.firstDelay
- - the amount of time to wait until executing the task.public static WrappedScheduler.TaskWrapper runAsynchronouslyRepeat(org.bukkit.plugin.Plugin plugin, java.lang.Runnable runnable, long firstDelay, long repeatDelay)
plugin
- - the owner plugin.runnable
- - the task to run.firstDelay
- - the amount of time to wait until executing the task for the first time.repeatDelay
- - the amount of time inbetween each execution. If less than zero, the task is only executed once.public static WrappedScheduler.TaskWrapper runAsynchronouslyRepeat(org.bukkit.plugin.Plugin plugin, org.bukkit.scheduler.BukkitScheduler scheduler, java.lang.Runnable runnable, long firstDelay, long repeatDelay)
plugin
- - the owner plugin.scheduler
- - the current Bukkit scheduler.runnable
- - the task to run.firstDelay
- - the amount of time to wait until executing the task for the first time.repeatDelay
- - the amount of time inbetween each execution. If less than zero, the task is only executed once.