Package net.pl3x.map.core.scheduler
Class Scheduler
java.lang.Object
net.pl3x.map.core.scheduler.Scheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add task to the scheduler.void
Add task to the scheduler.void
Add task to the scheduler.void
Add task to the scheduler.void
Add task to the scheduler.void
Cancel all scheduled tasks.protected void
void
tick()
Tick this scheduler once every tick.
-
Constructor Details
-
Scheduler
public Scheduler()
-
-
Method Details
-
tick
public void tick()Tick this scheduler once every tick. -
error
-
cancelAll
public void cancelAll()Cancel all scheduled tasks. -
addTask
Add task to the scheduler.- Parameters:
task
- Task to add
-
addTask
Add task to the scheduler.- Parameters:
delay
- Delay (in seconds) before task startsrunnable
- Task to add
-
addTask
Add task to the scheduler.- Parameters:
delay
- Delay (in seconds or ticks) before task startsrunnable
- Task to addticks
- Set to true to pass the delay as ticks instead of seconds
-
addTask
Add task to the scheduler.- Parameters:
delay
- Delay (in seconds) before task startsrepeat
- Whether this task should repeatrunnable
- Task to add
-
addTask
Add task to the scheduler.- Parameters:
delay
- Delay (in seconds or ticks) before task startsrepeat
- Whether this task should repeatrunnable
- Task to addticks
- Set to true to pass the delay as ticks instead of seconds
-