Interface Task


public interface Task
Represents a task being executed by the scheduler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Attempts to cancel task.
    @Nullable Object
    Retrieves the command sender of this task, if available.
    Retrieves the plugin owner of this task.
    boolean
    Checks if task has been cancelled.
    boolean
    Checks if task is a sync task.
  • 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.