Class FoliaScheduler
java.lang.Object
net.citizensnpcs.api.util.schedulers.adapter.FoliaScheduler
- All Implemented Interfaces:
SchedulerAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunEntityTask
(Entity entity, Runnable runnable) Executes a task specifically linked to an entity immediately.runEntityTaskLater
(Entity entity, Runnable runnable, long delayTicks) Executes a task specifically linked to an entity after a delay.runEntityTaskTimer
(Entity entity, Runnable runnable, long delayTicks, long periodTicks) Executes a repeating task specifically linked to an entity.runRegionTask
(Location location, Runnable runnable) Executes a task associated with a specific region or chunk.runRegionTask
(World world, int chunkX, int chunkZ, Runnable runnable) Executes a task associated with a specific region or chunk.runRegionTaskLater
(Location location, Runnable runnable, long delayTicks) Executes a task associated with a specific region or chunk after a delay.runRegionTaskLater
(World world, int chunkX, int chunkZ, Runnable runnable, long delayTicks) Executes a task associated with a specific region or chunk after a delay.runRegionTaskTimer
(Location location, Runnable runnable, long delayTicks, long periodTicks) Executes a repeating task associated with a specific region or chunk.runRegionTaskTimer
(World world, int chunkX, int chunkZ, Runnable runnable, long delayTicks, long periodTicks) Executes a repeating task associated with a specific region or chunk.Executes a task on the global server thread.runTaskAsynchronously
(Runnable runnable) Executes a task asynchronously immediately, off the main server thread.runTaskLater
(Runnable runnable, long delayTicks) Executes a task on the global server thread after a specified delay.runTaskLaterAsynchronously
(Runnable runnable, long delayTicks) Executes an asynchronous task after a specified delay.runTaskTimer
(Runnable runnable, long delayTicks, long periodTicks) Executes a repeating task on the global server thread.runTaskTimerAsynchronously
(Runnable runnable, long delayTicks, long periodTicks) Executes an asynchronous repeating task.
-
Constructor Details
-
FoliaScheduler
-
-
Method Details
-
runEntityTask
Description copied from interface:SchedulerAdapter
Executes a task specifically linked to an entity immediately. On Spigot, this defaults to the global thread.- Specified by:
runEntityTask
in interfaceSchedulerAdapter
-
runEntityTaskLater
Description copied from interface:SchedulerAdapter
Executes a task specifically linked to an entity after a delay. On Spigot, this defaults to the global thread.- Specified by:
runEntityTaskLater
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Delay before execution, measured in ticks.
-
runEntityTaskTimer
public SchedulerTask runEntityTaskTimer(Entity entity, Runnable runnable, long delayTicks, long periodTicks) Description copied from interface:SchedulerAdapter
Executes a repeating task specifically linked to an entity. On Spigot, this defaults to the global thread.- Specified by:
runEntityTaskTimer
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Initial delay before the first execution (in ticks).periodTicks
- Period between each subsequent execution (in ticks).
-
runRegionTask
Description copied from interface:SchedulerAdapter
Executes a task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTask
in interfaceSchedulerAdapter
-
runRegionTask
Description copied from interface:SchedulerAdapter
Executes a task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTask
in interfaceSchedulerAdapter
-
runRegionTaskLater
Description copied from interface:SchedulerAdapter
Executes a task associated with a specific region or chunk after a delay. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskLater
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Delay before execution, measured in ticks.
-
runRegionTaskLater
public SchedulerTask runRegionTaskLater(World world, int chunkX, int chunkZ, Runnable runnable, long delayTicks) Description copied from interface:SchedulerAdapter
Executes a task associated with a specific region or chunk after a delay. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskLater
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Delay before execution, measured in ticks.
-
runRegionTaskTimer
public SchedulerTask runRegionTaskTimer(Location location, Runnable runnable, long delayTicks, long periodTicks) Description copied from interface:SchedulerAdapter
Executes a repeating task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskTimer
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Initial delay before the first execution (in ticks).periodTicks
- Period between each subsequent execution (in ticks).
-
runRegionTaskTimer
public SchedulerTask runRegionTaskTimer(World world, int chunkX, int chunkZ, Runnable runnable, long delayTicks, long periodTicks) Description copied from interface:SchedulerAdapter
Executes a repeating task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskTimer
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Initial delay before the first execution (in ticks).periodTicks
- Period between each subsequent execution (in ticks).
-
runTask
Description copied from interface:SchedulerAdapter
Executes a task on the global server thread.- Specified by:
runTask
in interfaceSchedulerAdapter
-
runTaskAsynchronously
Description copied from interface:SchedulerAdapter
Executes a task asynchronously immediately, off the main server thread.- Specified by:
runTaskAsynchronously
in interfaceSchedulerAdapter
-
runTaskLater
Description copied from interface:SchedulerAdapter
Executes a task on the global server thread after a specified delay.- Specified by:
runTaskLater
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Delay before execution, measured in server ticks (1 tick = 50ms).
-
runTaskLaterAsynchronously
Description copied from interface:SchedulerAdapter
Executes an asynchronous task after a specified delay.- Specified by:
runTaskLaterAsynchronously
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Delay before execution, measured in ticks.
-
runTaskTimer
Description copied from interface:SchedulerAdapter
Executes a repeating task on the global server thread.- Specified by:
runTaskTimer
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Initial delay before the first execution (in ticks).periodTicks
- Period between each subsequent execution (in ticks).
-
runTaskTimerAsynchronously
public SchedulerTask runTaskTimerAsynchronously(Runnable runnable, long delayTicks, long periodTicks) Description copied from interface:SchedulerAdapter
Executes an asynchronous repeating task.- Specified by:
runTaskTimerAsynchronously
in interfaceSchedulerAdapter
- Parameters:
delayTicks
- Initial delay before the first execution (in ticks).periodTicks
- Period between each subsequent execution (in ticks).
-