Package-level declarations

Types

Link copied to clipboard

What the throttler decided to do with one despawning item.

Link copied to clipboard
class ThrottleManager(settingsSupplier: () -> ThrottleSettings, onlineLookup: (UUID) -> Player? = { null }, clock: () -> Long = System::currentTimeMillis)

Per-actor throttling of the despawn pipeline.

Link copied to clipboard
data class ThrottleQuota(val ratePerWindow: Int, val maxConcurrent: Int, val weight: Int, val bypass: Boolean = false)

The resolved per-actor allowance. One immutable snapshot of "how much of the despawn pipeline is this player entitled to right now".

Link copied to clipboard

Resolves a ThrottleQuota from permissions, mirroring the precedence io.fairyfox.papermc.despawneditems.limit.DespawnLimits already uses for location caps so admins only have to learn one pattern:

Link copied to clipboard
class TokenBucket(val capacity: Int, val windowMillis: Long, startMillis: Long = 0)

A classic token bucket: capacity tokens that refill smoothly over windowMillis.