public interface ScheduledTask extends Runnable
ScheduledRunnable
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the task, only needed for repeating tasks.
|
long |
interval()
Gets the interval set or created by the task
|
Plugin |
owner()
The plugin that scheduled the task, or passed in when scheduled
|
ScheduledRunnable |
runnable()
The execution runnable, invoked when the task is scheduled to occur
|
void |
setInterval(long interval)
Interval is the ticks left of a specific action for repeating and delayed tasks
|
TaskType |
type()
The task scheduling type
|
long interval()
setInterval(long)
void setInterval(long interval)
For delayed tasks, the interval is the amount of ticks delay, and for repeating, interval is the amount of ticks between each repeat of the task.
Setting the interval will become effective the next tick
interval
- the interval to set the task toScheduledRunnable runnable()
Plugin owner()
void cancel()
Copyright © 2016. All rights reserved.