Package dev.demeng.pluginbase.scheduler
Interface Task
- All Superinterfaces:
AutoCloseable,Terminable
Represents a scheduled repeating task.
-
Field Summary
Fields inherited from interface dev.demeng.pluginbase.terminable.Terminable
EMPTY -
Method Summary
Methods inherited from interface dev.demeng.pluginbase.terminable.Terminable
bindWith, closeAndReportException, closeSilently, isClosed
-
Method Details
-
getTimesRan
int getTimesRan()Gets the number of times this task ran. The counter is only incremented at the end of execution.- Returns:
- the number of times this task ran
-
stop
boolean stop()Stops the task.- Returns:
- true if the task wasn't already cancelled
-
getBukkitId
int getBukkitId()Gets the Bukkit ID for this task.- Returns:
- the bukkit id for this task
-
close
default void close()Stopsthe task.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTerminable
-