Folia plugins
Folia's regionised multithreading changes how plugins schedule work. How Codexe generates Folia-safe plugins and what to include in the request.
Updated
On this page
Folia is Paper's fork that ticks different regions of the world on different threads. There's no single "main thread", so ordinary Bukkit scheduling (Bukkit.getScheduler().runTask(...)) isn't valid.
#What Codexe does differently
When you pick the Folia type, the generated plugin:
- schedules work with the region, entity, global region and async schedulers instead of the Bukkit scheduler,
- declares
folia-supported: trueinplugin.yml, - builds against the Folia API (Maven).
#What to put in the request
Everything from the Spigot & Paper guide, plus timing-sensitive details: "teleport after 3 seconds", "repeat every minute for each online player". These are where Folia code differs most.
#Build and verification
Folia plugins are compiled and checked like any other plugin before they're Ready. Compiling proves the code builds against the Folia API. Thread safety at runtime still depends on the logic, so test on a Folia server.
#Common issues
| Symptom | Likely cause |
|---|---|
UnsupportedOperationException about the scheduler | Code (often from a dependency) uses the Bukkit scheduler. Ask the chat to move it to the region or entity scheduler. |
| Plugin refuses to load on Folia | folia-supported: true is missing from plugin.yml. |