Commit Graph

9 Commits

Author SHA1 Message Date
Josh Roy
5fa0556869
Use longs for scheduler delays/periods (#4) 2023-03-25 21:48:28 -07:00
Spottedleaf
75e3cdbc61 Rebase fixups 2023-03-25 16:29:07 -07:00
Nassim Jahnke
8d15f3e23d
Add methods taking world, chunkX, chunkZ to RegionScheduler 2023-03-25 18:40:20 +01:00
Nassim Jahnke
dfc157075a
Renames for consistency 2023-03-25 00:22:47 +01:00
Spottedleaf
c7fbdd87d2 Update to 1.19.4
Patches applied, but not yet checked compile.
2023-03-23 06:55:09 -07:00
Spottedleaf
50ad6c3131 New scheduler API
Now, entity/global/location schedulers implement a generic run,
runDelayed, and runAtFixedRate methods that provide a ScheduledTask
value that can be used to interact with the scheduled task.

Add also an async task scheduler that implements the same methods,
except the delays/periods are in time and not ticks, as the scheduler
is independent of the server tick process.

Additionally, throw on some unimplemented APIs now.
2023-03-23 02:51:04 -07:00
Spottedleaf
7e948a6179 Add global region scheduler
This will allow plugins to safely execute commands or perform
other global tick thread data modification.
2023-03-19 16:43:34 -07:00
Spottedleaf
4e7205d401 Change entity scheduler API to use Runnables
The generics pose a problem, and the parameter passed to the
Consumer is not needed in API.

Additionally, stop trying to cancel Bukkit scheduler tasks on
plugin disable as the Bukkit scheduler does not work.
2023-03-06 12:57:29 -08:00
Spottedleaf
282ded3b44 Add some scheduling API 2023-03-04 13:13:23 -08:00