Interface FancyScheduler
- All Known Implementing Classes:
BukkitScheduler,FoliaScheduler
public interface FancyScheduler
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the task.@NotNull FancySchedulerRun the task.@NotNull FancySchedulerRun the task asynchronously.@NotNull FancySchedulerrunTaskLater(org.bukkit.Location location, long delay, Runnable task) Run the task after a specified number of ticks.@NotNull FancySchedulerrunTaskLaterAsynchronously(long delay, Runnable task) Run the task asynchronously after a specified number of ticks.@NotNull FancySchedulerrunTaskTimer(org.bukkit.Location location, long delay, long period, Runnable task) Run the task repeatedly on a timer.@NotNull FancySchedulerrunTaskTimerAsynchronously(long delay, long period, Runnable task) Run the task repeatedly on a timer asynchronously.
-
Method Details
-
runTask
Run the task.- Parameters:
task- task...location- required for Folia, in Bukkit can be null- Returns:
- The created
FancyScheduler.
-
runTaskAsynchronously
Run the task asynchronously.- Parameters:
task- task...- Returns:
- The created
FancyScheduler
-
runTaskLater
@NotNull @NotNull FancyScheduler runTaskLater(org.bukkit.Location location, long delay, Runnable task) Run the task after a specified number of ticks.- Parameters:
location- required for Folia, in Bukkit can be nulltask- task...delay- The number of ticks to wait.- Returns:
- The created
FancyScheduler
-
runTaskLaterAsynchronously
Run the task asynchronously after a specified number of ticks.- Parameters:
task- task...delay- The number of ticks to wait.- Returns:
- The created
FancyScheduler
-
runTaskTimer
@NotNull @NotNull FancyScheduler runTaskTimer(org.bukkit.Location location, long delay, long period, Runnable task) Run the task repeatedly on a timer.- Parameters:
location- required for Folia, in Bukkit can be nulltask- task...delay- The delay before the task is first run (in ticks).period- The ticks elapsed before the task is run again.- Returns:
- The created
FancyScheduler
-
runTaskTimerAsynchronously
Run the task repeatedly on a timer asynchronously.- Parameters:
task- task...delay- The delay before the task is first run (in ticks).period- The ticks elapsed before the task is run again.- Returns:
- The created
FancyScheduler
-
cancel
void cancel()Cancel the task.
-