Class SpigotScheduler
java.lang.Object
net.citizensnpcs.api.util.schedulers.adapter.SpigotScheduler
- 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
-
SpigotScheduler
-
-
Method Details
-
runEntityTask
Description copied from interface:SchedulerAdapterExecutes a task specifically linked to an entity immediately. On Spigot, this defaults to the global thread.- Specified by:
runEntityTaskin interfaceSchedulerAdapter
-
runEntityTaskLater
Description copied from interface:SchedulerAdapterExecutes a task specifically linked to an entity after a delay. On Spigot, this defaults to the global thread.- Specified by:
runEntityTaskLaterin 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:SchedulerAdapterExecutes a repeating task specifically linked to an entity. On Spigot, this defaults to the global thread.- Specified by:
runEntityTaskTimerin interfaceSchedulerAdapter- Parameters:
delayTicks- Initial delay before the first execution (in ticks).periodTicks- Period between each subsequent execution (in ticks).
-
runRegionTask
Description copied from interface:SchedulerAdapterExecutes a task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskin interfaceSchedulerAdapter
-
runRegionTask
Description copied from interface:SchedulerAdapterExecutes a task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskin interfaceSchedulerAdapter
-
runRegionTaskLater
Description copied from interface:SchedulerAdapterExecutes a task associated with a specific region or chunk after a delay. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskLaterin 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:SchedulerAdapterExecutes a task associated with a specific region or chunk after a delay. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskLaterin 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:SchedulerAdapterExecutes a repeating task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskTimerin 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:SchedulerAdapterExecutes a repeating task associated with a specific region or chunk. On Spigot, this defaults to the global thread.- Specified by:
runRegionTaskTimerin interfaceSchedulerAdapter- Parameters:
delayTicks- Initial delay before the first execution (in ticks).periodTicks- Period between each subsequent execution (in ticks).
-
runTask
Description copied from interface:SchedulerAdapterExecutes a task on the global server thread.- Specified by:
runTaskin interfaceSchedulerAdapter
-
runTaskAsynchronously
Description copied from interface:SchedulerAdapterExecutes a task asynchronously immediately, off the main server thread.- Specified by:
runTaskAsynchronouslyin interfaceSchedulerAdapter
-
runTaskLater
Description copied from interface:SchedulerAdapterExecutes a task on the global server thread after a specified delay.- Specified by:
runTaskLaterin interfaceSchedulerAdapter- Parameters:
delayTicks- Delay before execution, measured in server ticks (1 tick = 50ms).
-
runTaskLaterAsynchronously
Description copied from interface:SchedulerAdapterExecutes an asynchronous task after a specified delay.- Specified by:
runTaskLaterAsynchronouslyin interfaceSchedulerAdapter- Parameters:
delayTicks- Delay before execution, measured in ticks.
-
runTaskTimer
Description copied from interface:SchedulerAdapterExecutes a repeating task on the global server thread.- Specified by:
runTaskTimerin 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:SchedulerAdapterExecutes an asynchronous repeating task.- Specified by:
runTaskTimerAsynchronouslyin interfaceSchedulerAdapter- Parameters:
delayTicks- Initial delay before the first execution (in ticks).periodTicks- Period between each subsequent execution (in ticks).
-