public class GlowTask extends FutureTask<Void> implements org.bukkit.scheduler.BukkitTask, org.bukkit.scheduler.BukkitWorker
| Constructor and Description |
|---|
GlowTask(org.bukkit.plugin.Plugin owner,
Runnable task,
boolean sync,
long delay,
long period)
Creates a new task with the specified number of ticks between consecutive calls to
execute().
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Stops this task.
|
protected void |
done() |
net.glowstone.scheduler.TaskExecutionState |
getLastExecutionState()
The last execution state returned by
shouldExecute() (most likely the state the task
is currently in). |
org.bukkit.plugin.Plugin |
getOwner()
The Plugin that owns this task.
|
int |
getTaskId()
The ID of this task.
|
Thread |
getThread()
The thread this task has been last executed on, if this task is async.
|
boolean |
isSync()
A flag indicating whether this task is to be run asynchronously.
|
void |
run() |
String |
toString() |
cancel, get, get, isCancelled, isDone, runAndReset, set, setExceptionpublic GlowTask(org.bukkit.plugin.Plugin owner,
Runnable task,
boolean sync,
long delay,
long period)
owner - The plugin which started the task.task - The runnable for this task.sync - If the task should be run synchronously.delay - The delay in ticks before running this task.period - The delay in ticks before running this task again. -1 for no repeat.public void cancel()
cancel in interface org.bukkit.scheduler.BukkitTaskpublic void run()
run in interface Runnablerun in interface RunnableFuture<Void>run in class FutureTask<Void>protected void done()
done in class FutureTask<Void>public int getTaskId()
getTaskId in interface org.bukkit.scheduler.BukkitTaskgetTaskId in interface org.bukkit.scheduler.BukkitWorkerpublic org.bukkit.plugin.Plugin getOwner()
getOwner in interface org.bukkit.scheduler.BukkitTaskgetOwner in interface org.bukkit.scheduler.BukkitWorkerpublic boolean isSync()
isSync in interface org.bukkit.scheduler.BukkitTaskpublic Thread getThread()
getThread in interface org.bukkit.scheduler.BukkitWorkerpublic net.glowstone.scheduler.TaskExecutionState getLastExecutionState()
shouldExecute() (most likely the state the task
is currently in).Copyright © 2021. All rights reserved.