Interface ScheduledTask

All Superinterfaces:
Identifiable, Nameable

public interface ScheduledTask extends Nameable, Identifiable
Represents a task that was scheduled through a scheduler using Scheduler.submit(Task).
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    boolean
    Cancels this scheduled task.
    boolean
    Gets whether this scheduled task has been cancelled.
     
     

    Methods inherited from interface org.spongepowered.api.util.Identifiable Link icon

    uniqueId

    Methods inherited from interface org.spongepowered.api.util.Nameable Link icon

    name
  • Method Details Link icon

    • scheduler Link icon

      Scheduler scheduler()
      Returns:
      The scheduler
    • task Link icon

      Task task()
      Returns:
      The Task
    • cancel Link icon

      boolean cancel()
      Cancels this scheduled task. Cancelling a repeating task will prevent any further repetitions of the task.
      Returns:
      If the task is not running and was cancelled
    • isCancelled Link icon

      boolean isCancelled()
      Gets whether this scheduled task has been cancelled.
      Returns:
      True if cancelled, false otherwise