Commit Graph

8 Commits

Author SHA1 Message Date
Riley Park
00864ac5b1 Update Upstream (PaperMC/Paper@cbcdfd03e7) 2023-03-29 19:41:15 -07:00
Josh Roy
88167d59d2
Add Server#isGlobalTickThread (#5) 2023-03-28 18:59:19 -07:00
Nassim Jahnke
836dc75b65
Replace Vector with Position in isOwnedByCurrentRegion methods
Closes #3
2023-03-25 18:50:36 +01: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
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
68b20e0acc Add API for checking ownership of region by position/entity
This may be useful for plugins which want to perform operations
over large areas outside of the buffer zone provided by the
regionaliser, as it is not guaranteed that anything outside
of the buffer zone is owned. Then, the plugins may use
the schedulers depending on the result of the ownership
check.
2023-03-07 14:44:37 -08:00