Class AgnosticScheduler
java.lang.Object
net.ME1312.SubServers.Client.Bukkit.Library.Compatibility.AgnosticScheduler
Folia Regional Scheduling Compatibility Class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AgnosticSchedulerProvides an asynchronous thread scheduler (in both folia and bukkit)static final AgnosticSchedulerProvides the folia global region scheduler / bukkit main thread scheduler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AgnosticSchedulerProvides a folia region scheduler / bukkit main thread schedulerstatic AgnosticSchedulerProvides a folia region scheduler / bukkit main thread schedulerstatic AgnosticSchedulerProvides a folia region scheduler / bukkit main thread schedulerstatic AgnosticSchedulerProvides a folia region scheduler / bukkit main thread schedulerstatic AgnosticSchedulerProvides a folia region scheduler / bukkit main thread schedulerstatic AgnosticSchedulerProvides a folia entity scheduler / bukkit main thread schedulerSchedules a repeating task that runs after a number of ticksabstract RunnableSchedules 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 RunnableSchedules a 1-time task that runs immediatelyabstract RunnableSchedules 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
-