MapModCompanion

MapModCompanion

198 Downloads

Folia support

turikhay opened this issue ยท 2 comments

commented

Folia is a new fork of Paper that adds regionized multithreading to the server.

only plugins that have been explicitly marked by the author(s) to work with Folia will be loaded. By placing "folia-supported: true" into the plugin's plugin.yml, plugin authors can mark their plugin as compatible with regionised multithreading.

[1] (from "The new rules" section)

commented

We don't rely on entities, chunks or basically anything that would require us to use single-thread Bukkit scheduler. That's why enabling Folia support may be as easy as simply marking our plugin as folia-supported: true.

But Folia isn't stable yet, and we don't even have publicly available builds of it (thus, no E2E tests yet).

commented

I've created folia branch for those interested in this. Download the build here: gradle-build.zip.

It worked, but required the following changes in the code:

  • Replaced Spigot API library with Folia Dev API
  • Bumped Java version of Spigot plugin to 17
  • Replaced runTaskLater(...) with getAsyncScheduler().runDelayed(...) (should probably move to short-lived thread pool to eliminate need in Paper API?) (upd: #74)
  • Locked buildSrc jackson dependencies to 2.12.7 (due to spigradle) (upd: removed entirely in #73)
  • Added folia-supported: true to plugin.yml (upd: #75)