Class FoliaTaskScheduler
java.lang.Object
com.palmergames.bukkit.towny.scheduling.impl.FoliaTaskScheduler
- All Implemented Interfaces:
TaskScheduler
- Direct Known Subclasses:
PaperTaskScheduler
@DefaultQualifier(org.jetbrains.annotations.NotNull.class)
public class FoliaTaskScheduler
extends Object
implements TaskScheduler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels all active tasks that have been scheduled bythis.plugin
boolean
isEntityThread
(org.bukkit.entity.Entity entity) boolean
boolean
isRegionThread
(org.bukkit.Location location) boolean
run
(Consumer<ScheduledTask> task) run
(org.bukkit.entity.Entity entity, Consumer<ScheduledTask> task) run
(org.bukkit.Location location, Consumer<ScheduledTask> task) runAsync
(Consumer<ScheduledTask> task) runAsyncLater
(Consumer<ScheduledTask> task, long delay, TimeUnit timeUnit) runAsyncRepeating
(Consumer<ScheduledTask> task, long delay, long period, TimeUnit timeUnit) runGlobal
(Consumer<ScheduledTask> task) runGlobalLater
(Consumer<ScheduledTask> task, long delay) runGlobalRepeating
(Consumer<ScheduledTask> task, long delay, long period) runLater
(Consumer<ScheduledTask> task, long delay) runLater
(org.bukkit.entity.Entity entity, Consumer<ScheduledTask> task, long delay) runLater
(org.bukkit.Location location, Consumer<ScheduledTask> task, long delay) runRepeating
(Consumer<ScheduledTask> task, long delay, long period) runRepeating
(org.bukkit.entity.Entity entity, Consumer<ScheduledTask> task, long delay, long period) runRepeating
(org.bukkit.Location location, Consumer<ScheduledTask> task, long delay, long period) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.palmergames.bukkit.towny.scheduling.TaskScheduler
run, run, run, runAsync, runAsyncLater, runAsyncRepeating, runLater, runLater, runLater, runRepeating, runRepeating, runRepeating
-
Constructor Details
-
FoliaTaskScheduler
public FoliaTaskScheduler(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
isGlobalThread
public boolean isGlobalThread()- Specified by:
isGlobalThread
in interfaceTaskScheduler
-
isTickThread
public boolean isTickThread()- Specified by:
isTickThread
in interfaceTaskScheduler
-
isEntityThread
public boolean isEntityThread(org.bukkit.entity.Entity entity) - Specified by:
isEntityThread
in interfaceTaskScheduler
-
isRegionThread
public boolean isRegionThread(org.bukkit.Location location) - Specified by:
isRegionThread
in interfaceTaskScheduler
-
run
- Specified by:
run
in interfaceTaskScheduler
-
run
- Specified by:
run
in interfaceTaskScheduler
-
run
- Specified by:
run
in interfaceTaskScheduler
-
runLater
- Specified by:
runLater
in interfaceTaskScheduler
-
runLater
public ScheduledTask runLater(org.bukkit.entity.Entity entity, Consumer<ScheduledTask> task, long delay) - Specified by:
runLater
in interfaceTaskScheduler
-
runLater
public ScheduledTask runLater(org.bukkit.Location location, Consumer<ScheduledTask> task, long delay) - Specified by:
runLater
in interfaceTaskScheduler
-
runRepeating
- Specified by:
runRepeating
in interfaceTaskScheduler
-
runRepeating
public ScheduledTask runRepeating(org.bukkit.entity.Entity entity, Consumer<ScheduledTask> task, long delay, long period) - Specified by:
runRepeating
in interfaceTaskScheduler
-
runRepeating
public ScheduledTask runRepeating(org.bukkit.Location location, Consumer<ScheduledTask> task, long delay, long period) - Specified by:
runRepeating
in interfaceTaskScheduler
-
runAsync
- Specified by:
runAsync
in interfaceTaskScheduler
-
runAsyncLater
- Specified by:
runAsyncLater
in interfaceTaskScheduler
-
runAsyncRepeating
public ScheduledTask runAsyncRepeating(Consumer<ScheduledTask> task, long delay, long period, TimeUnit timeUnit) - Specified by:
runAsyncRepeating
in interfaceTaskScheduler
-
runGlobal
- Specified by:
runGlobal
in interfaceTaskScheduler
-
runGlobalLater
- Specified by:
runGlobalLater
in interfaceTaskScheduler
-
runGlobalRepeating
- Specified by:
runGlobalRepeating
in interfaceTaskScheduler
-
cancelTasks
public void cancelTasks()Cancels all active tasks that have been scheduled bythis.plugin
-