Class BukkitScheduler

java.lang.Object
de.oliver.fancylib.serverSoftware.schedulers.BukkitScheduler
All Implemented Interfaces:
FancyScheduler

public class BukkitScheduler extends Object implements FancyScheduler
  • Constructor Details

    • BukkitScheduler

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

    • runTask

      @NotNull public @NotNull FancyScheduler runTask(org.bukkit.Location location, Runnable task)
      Description copied from interface: FancyScheduler
      Run the task.
      Specified by:
      runTask in interface FancyScheduler
      Parameters:
      location - required for Folia, in Bukkit can be null
      task - task...
      Returns:
      The created FancyScheduler.
    • runTaskAsynchronously

      @NotNull public @NotNull FancyScheduler runTaskAsynchronously(Runnable task)
      Description copied from interface: FancyScheduler
      Run the task asynchronously.
      Specified by:
      runTaskAsynchronously in interface FancyScheduler
      Parameters:
      task - task...
      Returns:
      The created FancyScheduler
    • runTaskLater

      @NotNull public @NotNull FancyScheduler runTaskLater(org.bukkit.Location location, long delay, Runnable task)
      Description copied from interface: FancyScheduler
      Run the task after a specified number of ticks.
      Specified by:
      runTaskLater in interface FancyScheduler
      Parameters:
      location - required for Folia, in Bukkit can be null
      delay - The number of ticks to wait.
      task - task...
      Returns:
      The created FancyScheduler
    • runTaskLaterAsynchronously

      @NotNull public @NotNull FancyScheduler runTaskLaterAsynchronously(long delay, Runnable task)
      Description copied from interface: FancyScheduler
      Run the task asynchronously after a specified number of ticks.
      Specified by:
      runTaskLaterAsynchronously in interface FancyScheduler
      Parameters:
      delay - The number of ticks to wait.
      task - task...
      Returns:
      The created FancyScheduler
    • runTaskTimer

      @NotNull public @NotNull FancyScheduler runTaskTimer(org.bukkit.Location location, long delay, long period, Runnable task)
      Description copied from interface: FancyScheduler
      Run the task repeatedly on a timer.
      Specified by:
      runTaskTimer in interface FancyScheduler
      Parameters:
      location - required for Folia, in Bukkit can be null
      delay - The delay before the task is first run (in ticks).
      period - The ticks elapsed before the task is run again.
      task - task...
      Returns:
      The created FancyScheduler
    • runTaskTimerAsynchronously

      @NotNull public @NotNull FancyScheduler runTaskTimerAsynchronously(long delay, long period, Runnable task)
      Description copied from interface: FancyScheduler
      Run the task repeatedly on a timer asynchronously.
      Specified by:
      runTaskTimerAsynchronously in interface FancyScheduler
      Parameters:
      delay - The delay before the task is first run (in ticks).
      period - The ticks elapsed before the task is run again.
      task - task...
      Returns:
      The created FancyScheduler
    • cancel

      public void cancel()
      Description copied from interface: FancyScheduler
      Cancel the task.
      Specified by:
      cancel in interface FancyScheduler