Skip to content

Detect missing Paper world defaults file - #194

Open
pavog wants to merge 1 commit into
masterfrom
paper-missing-world-defaults
Open

pavog wants to merge 1 commit into
masterfrom
paper-missing-world-defaults

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member
[16:59:04 WARN]: [WorldDefaultsMissing] Task #2 for WorldDefaultsMissing v1.0 generated an exception
java.lang.IllegalStateException: World defaults configuration file 'config/paper-world-defaults.yml' doesn't exist
	at io.papermc.paper.configuration.Configurations.createDefaultWorldLoader(Configurations.java:183) ~[paper-26.3.jar:26.3-248-0727243]
	at io.papermc.paper.configuration.Configurations.createWorldConfig(Configurations.java:214) ~[paper-26.3.jar:26.3-248-0727243]
	at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:1279) ~[paper-26.3.jar:26.3-248-0727243]

Paper throws this when it creates the configuration of a new world and config/paper-world-defaults.yml does not exist.
The file is created again on startup and on /paper reload, so this happens when the file is removed while the server is running and a plugin then creates a world.
Before, only the generic PluginRuntimeProblem matched, which blamed the plugin that created the world and suggested removing it.
This PR adds WorldDefaultsMissingProblem with a solution to restore the file from a backup or restart the server, which creates it again with default values.

PluginRuntimeProblem now skips scheduled tasks whose exception is this one, so the plugin is no longer reported as the cause.
The Bukkit class references the Paper constant for that, which is harmless on Spigot because the line never appears there.
The solution does not suggest regenerating worlds, because a restart is enough and nothing in the worlds is broken.

Not covered: if a plugin creates the world inside an event handler, the exception is wrapped in an EventException and only appears as Caused by:.
The new problem is still reported in that case, but the generic "Could not pass event" problem is reported as well.

Changes

  • add WorldDefaultsMissingProblem and register it in PaperAnalyser
  • add WorldDefaultsRestoreSolution
  • skip tasks failing on the missing world defaults file in PluginRuntimeProblem
  • add translations paper-world-defaults-missing-problem and paper-world-defaults-restore-solution
  • add test log paper-world-defaults-missing-26-3.log from a real Paper 26.3 run

@pavog
pavog requested a review from JulianVennen November 13, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants