Question How to work with worlds

Discussion in 'Plugin Help/Development/Requests' started by valli3, Jan 10, 2015.

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

    valli3

    Always, when I try to search for it, google finds me some other plugins, not actual tutorial, how to program it, I already figured out how to create world(
    Code:
            WorldCreator creator = new WorldCreator("TARDIS_PLAYER_" + owner);
            creator.type(null); //Trying to do void world
            world = Bukkit.createWorld(creator);
    )
    But how do I acces it after plugin reload? Can it be saved like configs, or it just save like other worlds into main server folder and I get it by name? Do any of you know any good site, where is this written? (Bukkit documentation of "World" is not good, I got nothing from it(Well, not really nothing, but nothing was really useful for me at this moment(Or Did I missed something?)))
     
  2. Offline

    pie_flavor

    I'm not sure how you think worlds work, but they don't work like that. Every world is saved as a world folder, like normal, inside the server folder. To get the world, use Bukkit.getWorld(worldname) or getWorld(UUID). You can also use getWorlds() and iterate through them if you're using some other identifier besides UUID or name.
     
  3. Offline

    valli3

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page