Class AgnosticScheduler
java.lang.Object
net.ME1312.SubServers.Client.Bukkit.Library.Compatibility.AgnosticScheduler
Folia Regional Scheduling Compatibility Class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AgnosticScheduler
Provides an asynchronous thread scheduler (in both folia and bukkit)static final AgnosticScheduler
Provides the folia global region scheduler / bukkit main thread scheduler -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AgnosticScheduler
Provides a folia region scheduler / bukkit main thread schedulerstatic AgnosticScheduler
Provides a folia region scheduler / bukkit main thread schedulerstatic AgnosticScheduler
Provides a folia region scheduler / bukkit main thread schedulerstatic AgnosticScheduler
Provides a folia region scheduler / bukkit main thread schedulerstatic AgnosticScheduler
Provides a folia region scheduler / bukkit main thread schedulerstatic AgnosticScheduler
Provides a folia entity scheduler / bukkit main thread schedulerSchedules a repeating task that runs after a number of ticksabstract Runnable
Schedules a repeating task that runs after a number of ticksSchedules a repeating task that runs after a number of timeunitsSchedules a repeating task that runs after a number of timeunitsabstract Runnable
Schedules a 1-time task that runs immediatelyabstract Runnable
Schedules a 1-time task that runs after a number of ticksSchedules a 1-time task that runs after a number of timeunits
-
Field Details
-
async
Provides an asynchronous thread scheduler (in both folia and bukkit) -
global
Provides the folia global region scheduler / bukkit main thread scheduler
-
-
Constructor Details
-
AgnosticScheduler
public AgnosticScheduler()
-
-
Method Details
-
at
Provides a folia region scheduler / bukkit main thread scheduler- Parameters:
block
- Block- Returns:
- Platform-agnostic Scheduler
-
at
Provides a folia region scheduler / bukkit main thread scheduler- Parameters:
location
- Block location- Returns:
- Platform-agnostic Scheduler
-
at
Provides a folia region scheduler / bukkit main thread scheduler- Parameters:
world
- Block worldx
- Block x coordinatez
- Block z coordinate- Returns:
- Platform-agnostic Scheduler
-
atChunk
Provides a folia region scheduler / bukkit main thread scheduler- Parameters:
chunk
- Chunk- Returns:
- Platform-agnostic Scheduler
-
atChunk
Provides a folia region scheduler / bukkit main thread scheduler- Parameters:
world
- Chunk worldcx
- Chunk x coordinatecz
- Chunk z coordinate- Returns:
- Platform-agnostic Scheduler
-
following
Provides a folia entity scheduler / bukkit main thread scheduler- Parameters:
entity
- Entity- Returns:
- Platform-agnostic Scheduler
-
runs
Schedules a 1-time task that runs immediately- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)- Returns:
- A Runnable that can currently be used to cancel the task
-
runs
Schedules a 1-time task that runs after a number of ticks- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)delay
- Delay in ticks- Returns:
- A Runnable that can currently be used to cancel the task
-
runs
Schedules a 1-time task that runs after a number of timeunits- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)delay
- Delayunits
- Time units- Returns:
- A Runnable that can currently be used to cancel the task
-
repeats
Schedules a repeating task that runs after a number of ticks- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)repeat
- Repeat delay in ticks- Returns:
- A Runnable that can currently be used to cancel the task
-
repeats
Schedules a repeating task that runs after a number of timeunits- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)repeat
- Repeat delayunits
- Time units- Returns:
- A Runnable that can currently be used to cancel the task
-
repeats
Schedules a repeating task that runs after a number of ticks- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)delay
- Initial delay in ticksrepeat
- Repeat delay in ticks- Returns:
- A Runnable that can currently be used to cancel the task
-
repeats
public Runnable repeats(Plugin plugin, Consumer<Runnable> task, long delay, long repeat, TimeUnit units) Schedules a repeating task that runs after a number of timeunits- Parameters:
plugin
- Plugintask
- Task (consumes a task cancellation runnable)delay
- Initial delayrepeat
- Repeat delayunits
- Time units- Returns:
- A Runnable that can currently be used to cancel the task
-