Folia Support
Obfeco runs natively on Folia. folia-supported: true is
declared in plugin.yml, and the plugin detects Folia at runtime by checking for
io.papermc.paper.threadedregions.RegionizedServer.
On Folia, Obfeco schedules work with Paper's own schedulers instead of the Bukkit scheduler:
- Repeating tasks (the batch save) and leaderboard queries run on the async scheduler.
- Command replies that arrive after a database lookup run on the global region scheduler.
- Player work (opening menus after a sign prompt, messages after a balance change, the
CurrencyChangeEvent) runs on that player's own entity scheduler, so it lands on the region that owns the player. - Database work runs on Obfeco's own threads, the same as on Paper.
On regular Paper the same calls go to the main thread and the Bukkit scheduler, so nothing changes for non-Folia servers.
What to know
Every command, menu, placeholder and the Vault hook work the same on Folia as on Paper. Two things are worth knowing:
- The
CurrencyChangeEventfires on the player's region thread on Folia, not a single main thread. Listeners should only touch that player and their surroundings. - Vault calls made by other plugins from an async thread are applied on the player's region, with a 10-second wait for it.