Package com.griefdefender.api.scheduler
Interface Task
public interface Task
Represents a task being executed by the scheduler
-
Method Details
-
getPlugin
Object getPlugin()Retrieves the plugin owner of this task.- Returns:
- The plugin owner
-
getCommandSender
@Nullable Object getCommandSender()Retrieves the command sender of this task, if available.- Returns:
- The command sender
-
isSync
boolean isSync()Checks if task is a sync task.- Returns:
- true if the task is run by main thread
-
isCancelled
boolean isCancelled()Checks if task has been cancelled.- Returns:
- true if the task has been cancelled
-
cancel
void cancel()Attempts to cancel task.
-