Imported World deleting after Server Restart

Discussion in 'Plugin Development' started by DevMax_Plg, Apr 4, 2020.

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

    DevMax_Plg

    Hey Guys,

    I am Developing a Plugin and i wrote a command that imports Worlds like MultiverseCore. The import works fine but when i restart the server the world is unloaded. I can't access it after a restart until i import it again.

    this is the code to import the world:
    Code:Java
    1. Bukkit.getServer().createWorld(new WorldCreator(args[0]));


    hope anyone can help me
     
  2. Offline

    bowlerguy66

    @DevMax_Plg To clarify, are you importing the worlds or creating them? It looks like you're creating the new world with that, but to access the other worlds couldn't you use
    Code:
    World w = Bukkit.getWorld(<name/UID>);
     
  3. Offline

    DevMax_Plg

    that doesnt work because when you download a map and put it in your server directory the server doesnt know that this is a world so i am "creating" it and the server says "oh the directory exists already so that must be a world"
     
  4. Offline

    bowlerguy66

    Oh I see now, I'm assuming args[0] is the filename that was put in the server directory right?
     
  5. Offline

    DevMax_Plg

    not the file name but the folder with world data in it
     
Thread Status:
Not open for further replies.

Share This Page