DespawnScheduler

Bounds the automatic despawn pipeline so a flood of despawning items can't storm the server. Items to relocate are enqueued; a once-per-tick drain starts at most performance.max-per-tick new DespawnProcesses and never exceeds performance.max-concurrent in flight. The queue is capped at performance.max-queue with a configurable drop policy.

This replaces the old model where every despawning item immediately spawned its own chunk-loading process with no upper bound.

Constructors

Link copied to clipboard
constructor(plugin: PaperMcDespawnedItems)

Properties

Link copied to clipboard
val queued: Int

Number of items waiting to be relocated.

Functions

Link copied to clipboard
fun enqueue(item: ItemStack)

Queues item for relocation, honouring the configured queue cap and drop policy.

Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()