Class BungeeSyncScheduler<T extends KarmaPlugin>
java.lang.Object
ml.karmaconfigs.api.common.timer.scheduler.Scheduler
ml.karmaconfigs.api.bungee.scheduler.BungeeSyncScheduler<T>
- Type Parameters:
T- the karma plugin
Bukkit special synchronous scheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the current task idbooleanGet if the scheduler has more tasksvoidonTaskComplete(Consumer<Integer> taskId)Action to perform when a task has been completedvoidonTaskStart(Consumer<Integer> taskId)Action to perform when a task has been startedintQueue another task to the scheduler
-
Constructor Details
-
BungeeSyncScheduler
Initialize the scheduler- Parameters:
source- the scheduler owner
-
-
Method Details
-
onTaskStart
Action to perform when a task has been started- Specified by:
onTaskStartin classScheduler- Parameters:
taskId- the action to perform
-
onTaskComplete
Action to perform when a task has been completed- Specified by:
onTaskCompletein classScheduler- Parameters:
taskId- the action to perform
-
queue
Queue another task to the scheduler -
currentTask
public final int currentTask()Get the current task id- Specified by:
currentTaskin classScheduler- Returns:
- the current task id
-
hasMoreTasks
public final boolean hasMoreTasks()Get if the scheduler has more tasks- Returns:
- if the scheduler has more tasks
-