Перейти к содержимому
Mineforgian

Folia For All

Add folia support to unsupported plugins

Загрузки
109
Подписчики
2
Обновлён
22 марта 2026 г.
Лицензия
All-Rights-Reserved

Опубликован 20 марта 2026 г.

FoliaForAll

Run your Paper plugins on Folia - no source changes required.

Folia rejects any plugin that doesn't explicitly declare folia-supported: true, and replaces the standard BukkitScheduler with a stub that throws UnsupportedOperationException on every call. FoliaForAll removes both of these barriers so that the vast majority of legacy Bukkit/Paper plugins work out of the box.


How it works

FoliaForAll ships as both a Java agent and a plugin that work together.

Java agent

  • Patches PluginDescriptionFile.isFoliaSupported() to always return true, bypassing Folia's load-time compatibility check for every installed plugin
  • Patches CraftServer.waitForAsyncTasksShutdown() to avoid a crash on server stop caused by scheduler type incompatibility

Plugin

  • Injects a BukkitScheduler compatibility adapter into the server at startup, routing calls to Folia's native scheduler APIs

The scheduler adapter maps the full BukkitScheduler API surface:

  • Sync tasksGlobalRegionScheduler (closest equivalent to Paper's main thread for non-world operations)
  • Async tasksAsyncScheduler
  • Delays and periods are converted from ticks to milliseconds (1 tick = 50 ms)

Installation

  1. Drop latest FoliaForAll-x.x.x.jar into your plugins/ folder.
  2. Add the Java agent to your server start command:
java -javaagent:plugins/FoliaForAll-x.x.x.jar -jar server.jar

Both steps are required. Without the -javaagent flag, plugins that don't declare folia-supported: true will still be rejected by Folia before the compatibility layer can help them.


Limitations

  • Sync tasks run on the global region thread, not a specific chunk region. Plugins that read or write block/entity data for a particular chunk may still encounter thread-safety errors. Use Folia's native RegionScheduler or EntityScheduler APIs for correct region-aware scheduling.
  • Task IDs are generated internally and are not shared with Folia's own task tracking.
  • This is a best-effort compatibility shim. Plugins with deep assumptions about Paper's single-threaded model may still misbehave on Folia's regionized architecture.

Requirements

  • Folia or a fork 1.20.4 or newer
  • Java 21+

Disclaimer

FoliaForAll is provided as-is, without any warranty or guarantee of functionality. While it aims to improve compatibility between legacy Bukkit/Paper plugins and Folia and its forks, we make no guarantees that any specific plugin will work correctly. Plugin crashes, data corruption, or unexpected behaviour caused by incompatible plugins remain the responsibility of the server operator. Use at your own risk.

Ченджлог

1.2.0Релиз1.21.9, 1.21.10, 1.21.11 · 22 марта 2026 г.

Fixed a bug where no plugins would load on startup due to a classloader issue with Folia's custom server classloader. The deferred plugin loading system now works correctly.

1.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 20 марта 2026 г.

1.0.0 - Initial Release

  • Java agent that patches PluginDescriptionFile.isFoliaSupported()

    to always return true, allowing legacy Bukkit/Paper plugins to pass Folia's load-time compatibility check without modification.

  • BukkitScheduler compatibility layer that routes scheduler calls to Folia's native APIs: Sync tasks -> GlobalRegionScheduler Async tasks -> AsyncScheduler

  • Unsafe-based scheduler injection into CraftServer at startup, replacing Folia's stub scheduler transparently.

  • Fix for AbstractMethodError on server shutdown caused by CraftServer.waitForAsyncTasksShutdown() calling getActiveWorkers() through a CraftScheduler reference on a non-CraftScheduler object.

Комментарии

Загружаем…