Class BukkitScheduler
java.lang.Object
de.oliver.fancylib.serverSoftware.schedulers.BukkitScheduler
- All Implemented Interfaces:
FancyScheduler
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
BukkitScheduler
public BukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin)
-
-
Method Details
-
runTask
Description copied from interface:FancySchedulerRun the task.- Specified by:
runTaskin interfaceFancyScheduler- Parameters:
location- required for Folia, in Bukkit can be nulltask- task...- Returns:
- The created
FancyScheduler.
-
runTaskAsynchronously
Description copied from interface:FancySchedulerRun the task asynchronously.- Specified by:
runTaskAsynchronouslyin interfaceFancyScheduler- 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:FancySchedulerRun the task after a specified number of ticks.- Specified by:
runTaskLaterin interfaceFancyScheduler- Parameters:
location- required for Folia, in Bukkit can be nulldelay- The number of ticks to wait.task- task...- Returns:
- The created
FancyScheduler
-
runTaskLaterAsynchronously
Description copied from interface:FancySchedulerRun the task asynchronously after a specified number of ticks.- Specified by:
runTaskLaterAsynchronouslyin interfaceFancyScheduler- 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:FancySchedulerRun the task repeatedly on a timer.- Specified by:
runTaskTimerin interfaceFancyScheduler- Parameters:
location- required for Folia, in Bukkit can be nulldelay- 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:FancySchedulerRun the task repeatedly on a timer asynchronously.- Specified by:
runTaskTimerAsynchronouslyin interfaceFancyScheduler- 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:FancySchedulerCancel the task.- Specified by:
cancelin interfaceFancyScheduler
-