Package net.pl3x.map.core.scheduler
Class Task
java.lang.Object
net.pl3x.map.core.scheduler.Task
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AbstractDataTask
,UpdateSettingsData
-
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 startsrepeat
- 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
-