Interface Task

All Superinterfaces:
Runnable
All Known Implementing Classes:
Expiring

public interface Task extends Runnable
Represents an expiring task that can be cancelled.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel this task without executing.
    default int
    Get the amount of game ticks between each repetition of this task.

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • cancel

      void cancel()
      Cancel this task without executing.
    • repeat

      default int repeat()
      Get the amount of game ticks between each repetition of this task. A non-positive value indicates no repetition scheduling for this task.
      Returns:
      the amount of game ticks