Package com.plotsquared.core.util.task
Interface PlotSquaredTask
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
PlotSquaredTask.NullTask
A task that can be run and cancelled (if repeating)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Task that does nothing and is always cancelled -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancel the taskboolean
Check if the task has been cancelledstatic PlotSquaredTask.NullTask
nullTask()
Get a newPlotSquaredTask.NullTask
default void
run()
Run the task.void
runTask()
Run the task
-
Method Details
-
nullTask
Get a newPlotSquaredTask.NullTask
- Returns:
- Null task instance
-
run
Run the task. Don't override this, instead implementrunTask()
-
runTask
void runTask()Run the task -
isCancelled
boolean isCancelled()Check if the task has been cancelled- Returns:
true
if the tasks is cancelled,false
if not
-
cancel
void cancel()Cancel the task
-