Package org.spongepowered.api.scheduler
Interface Task
-
public interface TaskRepresents a task that has been scheduled.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTask.BuilderRepresents a builder to create aTask.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Task.Builderbuilder()Creates a newTask.Builderto build aTask.Durationdelay()Gets the delay that the task was scheduled to run after.Durationinterval()Gets the interval for repeating tasks.org.spongepowered.plugin.PluginContainerplugin()
-
-
-
Method Detail
-
builder
static Task.Builder builder()
Creates a newTask.Builderto build aTask.- Returns:
- The new builder
-
plugin
org.spongepowered.plugin.PluginContainer plugin()
- Returns:
- The
plugin
-
delay
Duration delay()
Gets the delay that the task was scheduled to run after. A delay of 0 represents that the task started immediately.- Returns:
- The delay (offset) duration
-
interval
Duration interval()
Gets the interval for repeating tasks. An interval of 0 represents that the task does not repeat.- Returns:
- The interval (period) duration
-
-