Package dev.cwhead.GravesX.manager
Class SchedulerManager.Task
java.lang.Object
dev.cwhead.GravesX.manager.SchedulerManager.Task
- Enclosing class:
SchedulerManager
Managed task wrapper that retains the owning
SchedulerManager.-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels this task.@NotNull me.croabeast.scheduler.GlobalTaskReturns the rawGlobalTaskhandle.@NotNull org.bukkit.plugin.PluginReturns the plugin that scheduled this task.@NotNull SchedulerManagerReturns the owningSchedulerManager.intReturns the task id.booleanChecks if this task is cancelled.booleanChecks if this task is repeating.booleanChecks if this task is currently running.
-
Method Details
-
getSchedulerManager
Returns the owningSchedulerManager.- Returns:
- scheduler manager
-
getHandle
@NotNull public @NotNull me.croabeast.scheduler.GlobalTask getHandle()Returns the rawGlobalTaskhandle.- Returns:
- task handle
-
getTaskId
public int getTaskId()Returns the task id.- Returns:
- task id
-
cancel
public void cancel()Cancels this task. -
isCancelled
public boolean isCancelled()Checks if this task is cancelled.- Returns:
- true if cancelled, otherwise false
-
getPlugin
@NotNull public @NotNull org.bukkit.plugin.Plugin getPlugin()Returns the plugin that scheduled this task.- Returns:
- owning plugin
-
isRunning
public boolean isRunning()Checks if this task is currently running.- Returns:
- true if running, otherwise false
-
isRepeating
public boolean isRepeating()Checks if this task is repeating.- Returns:
- true if repeating, otherwise false
-