Interface PaperBackend
@Internal
public interface PaperBackend
The single-delivery seam between the lifecycle engine and Paper's schedulers.
-
Method Summary
Modifier and TypeMethodDescriptionio.papermc.paper.threadedregions.scheduler.ScheduledTaskSchedules once on the async pool, using nanoseconds rather than server ticks.@Nullable io.papermc.paper.threadedregions.scheduler.ScheduledTaskentity(org.bukkit.entity.Entity entity, Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, Runnable retired, long delayTicks) Schedules once on an entity, or returns null if that entity has already retired.io.papermc.paper.threadedregions.scheduler.ScheduledTaskSchedules once on the global region after at least one tick.booleanWhether this thread owns global tick work.booleanisOwnedByCurrentRegion(org.bukkit.entity.Entity entity) Whether this thread owns the entity.booleanisOwnedByCurrentRegion(org.bukkit.World world, int chunkX, int chunkZ) Whether this thread owns the chunk.static PaperBackendlive(org.bukkit.plugin.Plugin plugin) Creates a backend delegating to the live Paper APIs for the host plugin.io.papermc.paper.threadedregions.scheduler.ScheduledTaskregion(org.bukkit.World world, int chunkX, int chunkZ, Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, long delayTicks) Schedules once on the region owning the chunk after at least one tick.
-
Method Details
-
global
io.papermc.paper.threadedregions.scheduler.ScheduledTask global(Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, long delayTicks) Schedules once on the global region after at least one tick. -
region
io.papermc.paper.threadedregions.scheduler.ScheduledTask region(org.bukkit.World world, int chunkX, int chunkZ, Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, long delayTicks) Schedules once on the region owning the chunk after at least one tick. -
entity
@Nullable @Nullable io.papermc.paper.threadedregions.scheduler.ScheduledTask entity(org.bukkit.entity.Entity entity, Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, Runnable retired, long delayTicks) Schedules once on an entity, or returns null if that entity has already retired. -
async
io.papermc.paper.threadedregions.scheduler.ScheduledTask async(Consumer<io.papermc.paper.threadedregions.scheduler.ScheduledTask> task, long delayNanos) Schedules once on the async pool, using nanoseconds rather than server ticks. -
isGlobalTickThread
boolean isGlobalTickThread()Whether this thread owns global tick work. -
isOwnedByCurrentRegion
boolean isOwnedByCurrentRegion(org.bukkit.World world, int chunkX, int chunkZ) Whether this thread owns the chunk. -
isOwnedByCurrentRegion
boolean isOwnedByCurrentRegion(org.bukkit.entity.Entity entity) Whether this thread owns the entity. -
live
Creates a backend delegating to the live Paper APIs for the host plugin.
-