[SPIGOT-6263] Vanilla world migrator moves end and nether for world in subdirectory to the wrong folder Created: 01/Dec/20  Updated: 27/Dec/20

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Jon Janzen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Running on Linux, I don't have access to other platforms to test


Version:  This server is running CraftBukkit version git-Spigot-a19903d-e1ebdd9 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

On the server I run I have several different worlds of which only one is loaded at a time, I store all the worlds in a "worlds" subdirectory of the minecraft server folder to keep things organized and use a script to stop the server, update the level-name line in server.properties, and start the server again.

 

I'm investigating migrating to Spigot from the vanilla server but I ran into this problem: when Spigot migrates the world to separate folders the migrator and the server use different locations: the migrator uses worlds/NAME_nether and the server then attempts to load worlds/worlds/NAME_nether. I imagine that the migrator is correct and the server should be fixed but idk.

 

Steps to reproduce (assumes knowledge of UNIX/linux command line):

  1. Download a fresh server.jar from Mojang
  2. Build a new spigot.jar from BuildTools.jar
  3. Accept the EULA: `echo "eula=true" > eula.txt`
  4. Start the server: `java -jar server.jar nogui` 
  5. Go into creative and go into the Nether and place some blocks
  6. Go back into the overworld and stop the server
  7. Run `mkdir worlds && mv world worlds/`
  8. Edit server.properties to set level-name=worlds/world
  9. Run `java -jar spigot.jar nogui` to migrate the world
  10. Log back into the server and go back to the nether
  11. It's not the same nether! The game has generated a new nether
  12. (I assume the same applies to the End, but I didn't check)

After inspecting the tree structure of the worlds/ folder, I found that the original nether dimension was migrated to worlds/world_nether while the game created a new nether dimension in worlds/worlds/world_nether.



 Comments   
Comment by md_5 [ 27/Dec/20 ]

Black-Hole is right, it's meant to be a name not a path.
The fact that it works on Vanilla is basically an accident.

Comment by Airtheon Thesalion [ 10/Dec/20 ]

The vanilla server does handle paths in server.properties, creating a fresh server with level-name=worlds/world creates a folder "worlds" with a folder "world" inside it, but that might just be a side effect.

In any case, the default Minecraft handles paths, whether intentionally or not and Spigot doesn't deal with this correctly.
This is my output:

[00:01:02] [Server thread/INFO]: ---- Migration of old nether folder required ----
[00:01:02] [Server thread/INFO]: Unfortunately due to the way that Minecraft implemented multiworld support in 1.6, Bukkit requires that you move your nether folder to a new location in order to operate correctly.
[00:01:02] [Server thread/INFO]: We will move this folder for you, but it will mean that you need to move it back should you wish to stop using Bukkit in the future.
[00:01:02] [Server thread/INFO]: Attempting to move worlds\world\DIM-1 to worlds\world_nether\DIM-1...
[00:01:02] [Server thread/INFO]: Success! To restore nether in the future, simply move worlds\world_nether\DIM-1 to worlds\world\DIM-1
[00:01:02] [Server thread/INFO]: ---- Migration of old nether folder complete ----
[00:01:02] [Server thread/INFO]: -------- World Settings For [worlds\world_nether] --------

You would think then that this last [worlds\world_nether] would be the same folder as worlds\world_nether\DIM-1 but is not.

Like stated in the issue, the migration part actually goes well. 'server\worlds\world\DIM-1' gets migrated to 'server\worlds\world_nether\DIM-1', however Spigot looks in 'server\worlds\worlds\world_nether\DIM-1' when loading the world.

You can test this by creating a brand new Spigot server and setting level-name=worlds<double backslash which Jira won't print>world, this will create a new world in 'server\worlds\world' but the nether and the end in 'server\worlds\worlds\world_nether\DIM-1' and 'server\worlds\worlds\world_the_end\DIM1' respectively.

Comment by Black Hole [ 01/Dec/20 ]

I think that specifying a path in server.properties is unsupported. It is supposed to be a name only.
You should use symlinks instead.

Generated at Sat Apr 05 09:53:34 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.