Class SpongeScheduler
java.lang.Object
net.tnemc.plugincore.core.compatibility.scheduler.SchedulerProvider<SpongeChore>
net.tnemc.plugincore.sponge.impl.scheduler.SpongeScheduler
SpongeScheduler
- Since:
- 0.1.2.0
- Author:
- creatorfromhell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createDelayedTask
(Runnable task, ChoreTime delay, ChoreExecution environment) Used to create a task, which will execute after the specified delay.createRepeatingTask
(Runnable task, ChoreTime delay, ChoreTime period, ChoreExecution environment) Used to create a task, which repeats after a specified period.Methods inherited from class net.tnemc.plugincore.core.compatibility.scheduler.SchedulerProvider
cancelTask, createRepeatingTaskID
-
Constructor Details
-
SpongeScheduler
public SpongeScheduler()
-
-
Method Details
-
createDelayedTask
Used to create a task, which will execute after the specified delay.- Specified by:
createDelayedTask
in classSchedulerProvider<SpongeChore>
- Parameters:
task
- The task to run.delay
- The delay, in ticks.environment
- The execution environment for the task.
-
createRepeatingTask
public SpongeChore createRepeatingTask(Runnable task, ChoreTime delay, ChoreTime period, ChoreExecution environment) Used to create a task, which repeats after a specified period.- Specified by:
createRepeatingTask
in classSchedulerProvider<SpongeChore>
- Parameters:
task
- The task to run.delay
- The delay to run the task, in ticks.period
- The period to run the task.environment
- The execution environment for the task.- Returns:
- The associated
Chore
with this task.
-