Solved A Little Question

Discussion in 'Plugin Development' started by BungeeTheCookie, Jun 17, 2014.

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

    BungeeTheCookie

    If you have a world that is not loaded in the world container, and you use WorldCreator.name("Something").createWorld() with no environment or seed or whatever, will it modify the world folder or just load the world and leave it as is?
     
  2. BungeeTheCookie By the looks of it, it will just override the world with the defaults - use copy() if you want to copy the options.
     
  3. Offline

    BungeeTheCookie

    Well, Im resetting a world with the exact name. So what I am doing is storing a copy of the world in my folder, then once reset() is called, it unloads the world, deletes it, and then copies the world backup folder to the world container, and then loads it.. So how will I use copy() without having a different name for the world? Because what I would need to do is WorldCreator.name("other_name").copy("name").create(); but I want it to be the same name... Is there a way to change world names after a world is loaded?

    Would this work..
    WorldCreator creator = WorldCreator.name("someworld").copy("world");
    then delete the world and then do
    creator.name("someworld").create() ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  4. Offline

    Garris0n

    If one exists, it will load that world.

    Otherwise, it will create a new world.

    Read the JavaDocs.
     
    AdamQpzm likes this.
  5. Offline

    BungeeTheCookie

    When it says "if the world exists" does it simply mean folder, or a world instance?
     
  6. Offline

    BungeeTheCookie

    Large minigame bro. :) I gotta finish the code before I can use it
     
  7. Offline

    xTigerRebornx

    BungeeTheCookie Separate it into a testing plugin to test this specific thing?
     
  8. Offline

    BungeeTheCookie

    Or I could just wait until I got my minigame plugin finished and post any bugs about it in the future (probably three threads a day :p)? I think this thread deserves a solve. Thank you Garris0n and AdamQpzm for your help!
     
    AdamQpzm likes this.
Thread Status:
Not open for further replies.

Share This Page