Class PaperPluginScheduler

java.lang.Object
com.thewinterframework.paper.scheduler.PaperPluginScheduler
All Implemented Interfaces:
com.thewinterframework.scheduler.PluginScheduler

public class PaperPluginScheduler extends Object implements com.thewinterframework.scheduler.PluginScheduler
  • Constructor Details

    • PaperPluginScheduler

      public PaperPluginScheduler(org.bukkit.plugin.java.JavaPlugin plugin)
  • Method Details

    • getMainThreadExecutor

      public Executor getMainThreadExecutor()
      Specified by:
      getMainThreadExecutor in interface com.thewinterframework.scheduler.PluginScheduler
    • cancelAllTasks

      public void cancelAllTasks()
      Specified by:
      cancelAllTasks in interface com.thewinterframework.scheduler.PluginScheduler
    • cancelTask

      public void cancelTask(int taskId)
      Specified by:
      cancelTask in interface com.thewinterframework.scheduler.PluginScheduler
    • runAsync

      public int runAsync(Runnable runnable)
      Specified by:
      runAsync in interface com.thewinterframework.scheduler.PluginScheduler
    • runSync

      public int runSync(Runnable runnable)
      Specified by:
      runSync in interface com.thewinterframework.scheduler.PluginScheduler
    • runAtFixedRateAsync

      public int runAtFixedRateAsync(Runnable runnable, long initialDelay, long intervalTicks, com.thewinterframework.utils.TimeUnit unit)
      Specified by:
      runAtFixedRateAsync in interface com.thewinterframework.scheduler.PluginScheduler
    • runAtFixedRateSync

      public int runAtFixedRateSync(Runnable runnable, long initialDelay, long intervalTicks, com.thewinterframework.utils.TimeUnit unit)
      Specified by:
      runAtFixedRateSync in interface com.thewinterframework.scheduler.PluginScheduler
    • runDelayedAsync

      public int runDelayedAsync(Runnable runnable, long delayTicks, com.thewinterframework.utils.TimeUnit unit)
      Specified by:
      runDelayedAsync in interface com.thewinterframework.scheduler.PluginScheduler
    • runDelayedSync

      public int runDelayedSync(Runnable runnable, long delayTicks, com.thewinterframework.utils.TimeUnit unit)
      Specified by:
      runDelayedSync in interface com.thewinterframework.scheduler.PluginScheduler
    • ensureSync

      public void ensureSync(Runnable runnable)
      Specified by:
      ensureSync in interface com.thewinterframework.scheduler.PluginScheduler
    • getSync

      public <T> CompletableFuture<T> getSync(Supplier<T> supplier)
      Specified by:
      getSync in interface com.thewinterframework.scheduler.PluginScheduler