Class Task

java.lang.Object
net.pl3x.map.core.scheduler.Task
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
AbstractDataTask, UpdateSettingsData

public abstract class Task extends Object implements Runnable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Task(int delay)
    Creates a new schedulable task.
    Task(int delay, boolean repeat)
    Creates a new schedulable task.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Mark task as cancelled.
    boolean
    Check if task is marked as cancelled.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Runnable

    run
  • Constructor Details

    • Task

      public Task(int delay)
      Creates a new schedulable task.
      Parameters:
      delay - Delay (in ticks) before task starts
    • Task

      public Task(int delay, boolean repeat)
      Creates a new schedulable task.
      Parameters:
      delay - Delay (in ticks) before task starts
      repeat - Whether this task should repeat
  • Method Details

    • cancel

      public void cancel()
      Mark task as cancelled.
    • cancelled

      public boolean cancelled()
      Check if task is marked as cancelled.
      Returns:
      True if cancelled