Interface Scheduler


  • public interface Scheduler
    Represents a scheduler to execute tasks on the proxy.
    • Method Detail

      • buildTask

        Scheduler.TaskBuilder buildTask​(@NotNull
                                        @NotNull Object plugin,
                                        @NotNull
                                        @NotNull Runnable runnable)
        Initializes a new Scheduler.TaskBuilder for creating a task on the proxy.
        Parameters:
        plugin - the plugin to request the task for
        runnable - the task to run when scheduled
        Returns:
        the task builder
      • buildTask

        Scheduler.TaskBuilder buildTask​(@NotNull
                                        @NotNull Object plugin,
                                        @NotNull
                                        @NotNull Consumer<ScheduledTask> consumer)
        Initializes a new Scheduler.TaskBuilder for creating a task on the proxy.
        Parameters:
        plugin - the plugin to request the task for
        consumer - the task to be run when scheduled with the capacity to cancel itself
        Returns:
        the task builder