Skip to main content

CooldownManager

xyz.refineryteam.refinerycore.api.cooldown.CooldownManager tracks arbitrary cooldowns keyed by (namespace, key, subject). The namespace is typically your plugin or feature name (e.g. "kits", "combat"), so two plugins can use the same subject/key without colliding.
The command framework already uses an internal CooldownManager for the @Cooldown annotation — you only need to use this class directly for cooldowns outside of commands (ability usage, kit claims, etc).
KitsManager.java
tryAcquire is the recommended entry point for most “can this action happen” checks, since it avoids a separate check-then-set race.

RefineryScheduler

xyz.refineryteam.refinerycore.api.scheduler.RefineryScheduler wraps Paper’s Folia-compatible region/entity/async schedulers behind a flat set of static methods, so plugin code doesn’t need to branch between the legacy BukkitScheduler and Folia’s region-based scheduler APIs.
EntityScheduler.java
Prefer RefineryScheduler over calling Bukkit.getScheduler() directly anywhere your plugin might run on Folia. Mixing the legacy BukkitScheduler with Folia’s region schedulers in the same plugin is a common source of IllegalStateExceptions on Folia servers.