Extra Nether/End worlds are treated as Overworlds upon server restart

I’ve been having this problem on Paper 1.17.1-R0.1-SNAPSHOT.

SHORT QUESTION: On startup, can I stop the server from loading a previously created (and NOT default) world before I want it to?

LONG QUESTION BELOW

For context purposes, I’m creating a Manhunt Paper plugin that allows groups of people to create their own “Set” of worlds (An overworld, a nether, and an end) for playing the game, all completely separate from the normal server worlds. There is also a pausing feature so that players can put aside the Manhunt and finish it later, even if the server turns off and on again between sessions.

For the most part, this has been successful. The games are properly set up when started/restarted, and the games end/pause properly, deleting the worlds once they’re no longer needed. There is one specific situation where I’ve been having issues.

As an example, let’s say the normal world folders are called “world”, “world_the_nether”, and “world_the_end”. And let’s say the manhunt world folders are called “manhunt_world”, “manhunt_world_nether”, and “manhunt_world_end”, laid out the same way. The creation of these manhunt worlds are manually triggered, and they are only ever supposed to be loaded manually. (Assume the worlds are emptied of players whenever a manhunt game is not actively running)

The normal worlds are never affected at all, and when the server is kept on from the creation of the manhunt worlds until they’re no longer needed, the manhunt worlds function exactly as intended.

BUT when a manhunt is paused and the server is turned off and back on, the server tries to load the manhunt worlds independently after all the plugins are enabled. “manhunt_world” is already an overworld folder, so it isn’t affected by this. But then the server looks at “manhunt_world_nether” and “manhunt_world_end” and doesn’t see nether and end worlds.

Instead, it just sees more overworlds that are missing files (nether/end folders are structured differently from overworld folders). So it populated those folders with overworld files. This means that when the manhunt is resumed, the actual nether and end are inaccessible, blocked off by these unnecessarily generated overworlds.

Is there a way that I can get the server to ignore the manhunt worlds until I want them to load? Or at the very least, is there a way I can make sure the server loads them correctly?

The server won’t load random worlds just because they happen to be in the same folder as itself; your or another plugin would have to be loading them after the restarting, in which case you wait to load them by not loading them at startup

1 Like

You were correct. I missed a WorldCreator that was causing the unnecessary overworlds instead of loading the correct dimensions.

Remember, people: There are some settings you can safely ignore if using a WorldCreator to load an existing world, but the Environment is NOT one of them.