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 classTask that does nothing and is always cancelled -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the taskbooleanCheck if the task has been cancelledstatic PlotSquaredTask.NullTasknullTask()Get a newPlotSquaredTask.NullTaskdefault voidrun()Run the task.voidrunTask()Run the task
-
Method Details
-
nullTask
Get a newPlotSquaredTask.NullTask- Returns:
- Null task instance
-
run
default void 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:
trueif the tasks is cancelled,falseif not
-
cancel
void cancel()Cancel the task
-