Server setupFolia Error: Cannot read field "captureTreeGeneration" (getCurrentWorldData is null)
What the log looks like
java\.lang\.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net\.minecraft\.world\.level\.World\.getCurrentWorldData\(\)" is null
How to fix it
- Check the lines directly below `CraftBlock` or `World` in your log for a `.jar//` plugin name (such as `ProjectKorra-1.12.1.jar//` or `Negativity-2.7-SNAPSHOT.jar//`) to find which plugin touched blocks off-thread.
- Update the offending plugin to a version with proper Folia `RegionScheduler` / `EntityScheduler` support, or remove it if it was only built for Spigot and Paper.
- Update your Folia server jar to the latest build for your Minecraft version, as older Folia builds had internal bugs with shutdown threads and players logging in after sleeping.
- If no plugins are involved and a player cannot join with `Loading entity NBT` and `stopSleeping` in the trace, open their `<UUID>.dat` file inside `world/playerdata/` with NBTExplorer and delete the `SleepingX`, `SleepingY`, and `SleepingZ` tags.
- If several of your required plugins trigger this error, migrate your server from Folia back to Paper, which uses a single main thread and supports standard Bukkit block lookups.
| Loaders | Server |
|---|
| Severity | Breaks something |
|---|
| Category | Server setup |
|---|
Check your own log