Server setup

Folia 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
LoadersServer
SeverityBreaks something
CategoryServer setup

Check your own log

Related errors