Interface GlobalRegionScheduler
public interface GlobalRegionScheduler
The global region task scheduler may be used to schedule tasks that will execute on the global region.
 
The global region is responsible for maintaining world day time, world game time, weather cycle, sleep night skipping, executing commands for console, and other misc. tasks that do not belong to any specific region.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancelTasks(@NotNull Plugin plugin) Attempts to cancel all tasks scheduled by the specified plugin.voidSchedules a task to be executed on the global region.Schedules a task to be executed on the global region on the next tick.runAtFixedRate(@NotNull Plugin plugin, @NotNull Consumer<ScheduledTask> task, long initialDelayTicks, long periodTicks) Schedules a repeating task to be executed on the global region after the initial delay with the specified period.runDelayed(@NotNull Plugin plugin, @NotNull Consumer<ScheduledTask> task, long delayTicks) Schedules a task to be executed on the global region after the specified delay in ticks.
- 
Method Details- 
executeSchedules a task to be executed on the global region.- Parameters:
- plugin- The plugin that owns the task
- run- The task to execute
 
- 
run@NotNull @NotNull ScheduledTask run(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Consumer<ScheduledTask> task) Schedules a task to be executed on the global region on the next tick.- Parameters:
- plugin- The plugin that owns the task
- task- The task to execute
- Returns:
- The ScheduledTaskthat represents the scheduled task.
 
- 
runDelayed@NotNull @NotNull ScheduledTask runDelayed(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Consumer<ScheduledTask> task, long delayTicks) Schedules a task to be executed on the global region after the specified delay in ticks.- Parameters:
- plugin- The plugin that owns the task
- task- The task to execute
- delayTicks- The delay, in ticks.
- Returns:
- The ScheduledTaskthat represents the scheduled task.
 
- 
runAtFixedRate@NotNull @NotNull ScheduledTask runAtFixedRate(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Consumer<ScheduledTask> task, long initialDelayTicks, long periodTicks) Schedules a repeating task to be executed on the global region after the initial delay with the specified period.- Parameters:
- plugin- The plugin that owns the task
- task- The task to execute
- initialDelayTicks- The initial delay, in ticks.
- periodTicks- The period, in ticks.
- Returns:
- The ScheduledTaskthat represents the scheduled task.
 
- 
cancelTasksAttempts to cancel all tasks scheduled by the specified plugin.- Parameters:
- plugin- Specified plugin.
 
 
-