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, setException
public 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.BukkitTask
public void run()
run
in interface Runnable
run
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.BukkitTask
getTaskId
in interface org.bukkit.scheduler.BukkitWorker
public org.bukkit.plugin.Plugin getOwner()
getOwner
in interface org.bukkit.scheduler.BukkitTask
getOwner
in interface org.bukkit.scheduler.BukkitWorker
public boolean isSync()
isSync
in interface org.bukkit.scheduler.BukkitTask
public Thread getThread()
getThread
in interface org.bukkit.scheduler.BukkitWorker
public net.glowstone.scheduler.TaskExecutionState getLastExecutionState()
shouldExecute()
(most likely the state the task
is currently in).Copyright © 2021. All rights reserved.