Solved Register new world

Discussion in 'Plugin Development' started by ionre, Feb 19, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ionre

    Hello everybody,

    I know there are plugins for this, but I just want to do it myself and have control over the code.

    Alright, my problem is that getServer.getWorld("name") returns null. When i create the world with
    Code:java
    1. getServer().createWorld(new WorldCreator("name"));

    it works, but I want the world to be a specific world from my Singleplayer, and not just a randomly generated world.

    QUESTION:
    How can I tell bukkit to register a world, as this seems to be the issue?

    Thanks in advance!
     
  2. Offline

    Garris0n

    Put the world from your SinglePlayer in the worlds folder.
     
  3. Offline

    ionre

    There is no worlds folder, and creating one and putting the wolds into it doesn't work
     
  4. Offline

    Garris0n

    The world container is, by default, the server folder. This can be changed, but just put the world in your server folder. Then do createWorld with it's name to load it.
     
  5. Offline

    ionre

    Oh didn't know about the createWorld. I thought this only creates new worlds, turns out it also loads them if they already exist
     
Thread Status:
Not open for further replies.

Share This Page