Interface AsyncScheduler

All Superinterfaces:
Scheduler

public interface AsyncScheduler extends Scheduler
A Scheduler that can run tasks asynchronously
  • Method Details

    • get

      static AsyncScheduler get(org.bukkit.plugin.Plugin plugin)
      Get the AsyncScheduler for the given plugin
      Parameters:
      plugin - the plugin
      Returns:
      the scheduler
    • runLater

      Task runLater(Runnable runnable, long delay, TimeUnit unit)
      Run a task later
      Parameters:
      runnable - the runnable
      delay - the delay
      unit - the unit of the delay
      Returns:
      the task
    • runTimer

      Task runTimer(BooleanSupplier runnable, long delay, long period, TimeUnit unit)
      Run a task repeatedly
      Parameters:
      runnable - the runnable, returning true to continue or false to stop
      delay - the delay
      period - the period
      unit - the unit of the delay and period
      Returns:
      the task
    • runTimer

      default Task runTimer(Runnable runnable, long delay, long period, TimeUnit unit)
      Run a task repeatedly
      Parameters:
      runnable - the runnable
      delay - the delay
      period - the period
      unit - the unit of the delay and period
      Returns:
      the task