Package com.comphenix.protocol.scheduler
Class UniversalRunnable
java.lang.Object
com.comphenix.protocol.scheduler.UniversalRunnable
- All Implemented Interfaces:
Runnable
Just modified BukkitRunnable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()runTask(org.bukkit.plugin.Plugin plugin) Schedules this in the scheduler to run on next tick.runTaskLater(org.bukkit.plugin.Plugin plugin, long delay) Schedules this to run after the specified number of server ticks.
-
Constructor Details
-
UniversalRunnable
public UniversalRunnable()
-
-
Method Details
-
cancel
- Throws:
IllegalStateException
-
runTask
public Task runTask(org.bukkit.plugin.Plugin plugin) throws IllegalArgumentException, IllegalStateException Schedules this in the scheduler to run on next tick.- Parameters:
plugin- the reference to the plugin scheduling task- Returns:
Task- Throws:
IllegalArgumentException- if plugin is nullIllegalStateException- if this was already scheduled- See Also:
-
runTaskLater
public Task runTaskLater(org.bukkit.plugin.Plugin plugin, long delay) throws IllegalArgumentException, IllegalStateException Schedules this to run after the specified number of server ticks.- Parameters:
plugin- the reference to the plugin scheduling taskdelay- the ticks to wait before running the task- Returns:
Task- Throws:
IllegalArgumentException- if plugin is nullIllegalStateException- if this was already scheduled- See Also:
-