Class FoliaScheduler
java.lang.Object
me.hsgamer.hscore.bukkit.scheduler.folia.FoliaScheduler
- All Implemented Interfaces:
Scheduler
The Folia implementation of
Scheduler-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelAllTasks(org.bukkit.plugin.Plugin plugin) Cancel all tasks of the pluginrunEntityTask(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, boolean async) Run a task related to an entityrunEntityTaskLater(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, long delay, boolean async) Run a delayed task related to an entityrunEntityTaskTimer(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, BooleanSupplier runnable, Runnable retired, long delay, long period, boolean async) Run a task repeatedly related to an entityRun a taskrunTaskLater(org.bukkit.plugin.Plugin plugin, Runnable runnable, long delay, boolean async) Run a delayed taskrunTaskTimer(org.bukkit.plugin.Plugin plugin, BooleanSupplier runnable, long delay, long period, boolean async) Run a task repeatedlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.bukkit.scheduler.Scheduler
runEntityTask, runEntityTaskLater, runEntityTaskLaterWithFinalizer, runEntityTaskTimer, runEntityTaskTimer, runEntityTaskTimer, runEntityTaskWithFinalizer, runTaskTimer
-
Constructor Details
-
FoliaScheduler
public FoliaScheduler()
-
-
Method Details
-
cancelAllTasks
public void cancelAllTasks(org.bukkit.plugin.Plugin plugin) Description copied from interface:SchedulerCancel all tasks of the plugin- Specified by:
cancelAllTasksin interfaceScheduler- Parameters:
plugin- the plugin
-
runTask
Description copied from interface:SchedulerRun a task -
runTaskLater
public Task runTaskLater(org.bukkit.plugin.Plugin plugin, Runnable runnable, long delay, boolean async) Description copied from interface:SchedulerRun a delayed task- Specified by:
runTaskLaterin interfaceScheduler- Parameters:
plugin- the plugin that owns the taskrunnable- the taskdelay- the delay in ticks before the task is runasync- whether the task is async- Returns:
- the task
-
runTaskTimer
public Task runTaskTimer(org.bukkit.plugin.Plugin plugin, BooleanSupplier runnable, long delay, long period, boolean async) Description copied from interface:SchedulerRun a task repeatedly- Specified by:
runTaskTimerin interfaceScheduler- Parameters:
plugin- the plugin that owns the taskrunnable- the task. Return true to continue, false to stop.delay- the delay in ticks before the task is runperiod- the period in ticks between each runasync- whether the task is async- Returns:
- the task
-
runEntityTask
public Task runEntityTask(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, boolean async) Description copied from interface:SchedulerRun a task related to an entity- Specified by:
runEntityTaskin interfaceScheduler- Parameters:
plugin- the plugin that owns the taskentity- the entity that the task is related torunnable- the taskretired- the task when the entity is retired (e.g. removed, invalid)async- whether the task is async- Returns:
- the task
-
runEntityTaskLater
public Task runEntityTaskLater(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, Runnable runnable, Runnable retired, long delay, boolean async) Description copied from interface:SchedulerRun a delayed task related to an entity- Specified by:
runEntityTaskLaterin interfaceScheduler- Parameters:
plugin- the plugin that owns the taskentity- the entity that the task is related torunnable- the taskretired- the task when the entity is retired (e.g. removed, invalid)delay- the delay in ticks before the task is runasync- whether the task is async- Returns:
- the task
-
runEntityTaskTimer
public Task runEntityTaskTimer(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Entity entity, BooleanSupplier runnable, Runnable retired, long delay, long period, boolean async) Description copied from interface:SchedulerRun a task repeatedly related to an entity- Specified by:
runEntityTaskTimerin interfaceScheduler- Parameters:
plugin- the plugin that owns the taskentity- the entity that the task is related torunnable- the task. Return true to continue, false to stop.retired- the task when the entity is retired (e.g. removed, invalid)delay- the delay in ticks before the task is runperiod- the period in ticks between each runasync- whether the task is async- Returns:
- the task
-