public class ScheduledTask
extends java.lang.Object
implements org.bukkit.scheduler.BukkitTask
| Constructor and Description |
|---|
ScheduledTask(int id,
org.bukkit.plugin.Plugin plugin,
boolean isSync,
long scheduledTick,
java.lang.Runnable runnable) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
org.bukkit.plugin.Plugin |
getOwner() |
java.lang.Runnable |
getRunnable()
Get the task itself that will be ran.
|
long |
getScheduledTick()
Get the tick at which the task is scheduled to run at.
|
int |
getTaskId() |
boolean |
isCancelled() |
boolean |
isSync() |
void |
run()
Runs the task if it has not been cancelled.
|
protected void |
setScheduledTick(long scheduledTick)
Sets the tick at which the task is scheduled to run at.
|
public ScheduledTask(int id,
org.bukkit.plugin.Plugin plugin,
boolean isSync,
long scheduledTick,
java.lang.Runnable runnable)
public long getScheduledTick()
protected void setScheduledTick(long scheduledTick)
scheduledTick - The tick at which the task is scheduled to run at.public java.lang.Runnable getRunnable()
public void run()
public int getTaskId()
getTaskId in interface org.bukkit.scheduler.BukkitTaskpublic org.bukkit.plugin.Plugin getOwner()
getOwner in interface org.bukkit.scheduler.BukkitTaskpublic boolean isSync()
isSync in interface org.bukkit.scheduler.BukkitTaskpublic boolean isCancelled()
isCancelled in interface org.bukkit.scheduler.BukkitTaskpublic void cancel()
cancel in interface org.bukkit.scheduler.BukkitTask