0
\$\begingroup\$

I run a Minecraft server (Bukkit 1.7.9) and would like to have a second overworld-like world, into which I can teleport players from my plugin. I did some testing with the "world" folder:

  • tried to simply rename the folder, but then a new world is generated on server start (into folder "world")

  • moved another world with different folder name into the server directory (in addition the original world folder)

  • tried to change the "level-name" value in server.properties but that does just generate new nether and end folders containing the new name

But in all cases the additional world is not listed when

Bukkit.getWorlds()

is called from the plugin (of course I restarted the server after adding the world). So now the question is how do I properly rename a world? I was not able to find something via a search engine nor could I find a file in the world folder that contains the world's name to change it there.

I know that I could use Multiverse or a similar plugin to do what I want but I hope that there is an easier way (like the one i tried).

I hope you can understand everything, sorry that it's not the best English but I'm not a native speaker ^^ . If I missed to tell you something you need to know please ask :) If anything else is wrong with this post please tell me as this is my first question posted here. Any idea or help is appreciated!

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I actually solved it! I luckily found another question some minutes ago, and someone answered that you have to load the world first:

WorldCreator creator = new WorldCreator( "worldname" );
World w = creator.createWorld();

(That does not overwrite the world if a folder with name "worldname" exists but rather loads it and so you can see it in the list returned by Bukkit.getWorlds() and use it like any other world)

Then you can create a Location instance with that world.

I hope that helps other people, too!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .