Folia scheduler and owned region API
Pulling Folia API to Paper is primarily intended for plugins that want to target both Paper and Folia without unnecessary compatibility layers. Add both a location based scheduler, an entity based scheduler, and a global region scheduler. Owned region API 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.
This commit is contained in:
@ -1101,4 +1101,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
boolean wouldCollideUsing(@NotNull BoundingBox boundingBox);
|
||||
// Paper end - Collision API
|
||||
|
||||
// Paper start - Folia schedulers
|
||||
/**
|
||||
* Returns the task scheduler for this entity. The entity scheduler can be used to schedule tasks
|
||||
* that are guaranteed to always execute on the tick thread that owns the entity.
|
||||
* <p><b>If you do not need/want to make your plugin run on Folia, use {@link org.bukkit.Server#getScheduler()} instead.</b></p>
|
||||
* @return the task scheduler for this entity.
|
||||
* @see io.papermc.paper.threadedregions.scheduler.EntityScheduler
|
||||
*/
|
||||
@NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler getScheduler();
|
||||
// Paper end - Folia schedulers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user