[World Generation] Override allow-nether

Discussion in 'Plugin Development' started by mineart.at, Apr 23, 2013.

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

    mineart.at

    How can I force Bukkit to load multiple worlds by folder?

    Okay, createWorld() also loads them...

    Code:
        public void onEnable() {
            File root = new File(this.getServer().getWorldContainer()
                    .getAbsolutePath());
           
            for (final File file : root.listFiles()) {
                String name = file.getName();
                if (file.isDirectory() && name.startsWith("world_")) {
                    if(Bukkit.getWorld(name) == null) {
                        getServer().createWorld(new WorldCreator(name));
                        System.out.println("Welt " + name + " geladen!");
                    }
                }
            }
        }
    Next problem appeared. I set allow-nether to false and created a new world with Environment.NETHER. After restarting the server, the whole world got recreated with normal terrain. Is it possible to override it? Or to label the nether-world independantly of the default level name?

    Any ideas?

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

    xTwisteDx

    Are the "world" folders in one directory? Or are they in sub-directories?
     
  3. you creating a normal world instead of a nether world? you never looked if its a nether world
     
  4. Offline

    mineart.at

    xTwisteDx
    Currently it's the default path (craftbukkit.jar location)
    ferrybig
    In mcEdit it is shown as a normal world with blue background, but the generated chunks consist of netherrack.
     
  5. mcedit does things behind the scenes, the worlds dimension depends on where it gets its chunks from
     
  6. Offline

    mineart.at

    The server overwrites nether worlds regardless of wether they are created or existing ones are imported. It works fine with allow-nether set to true, except that Bukkit creates it's own nether (levelname_nether) too. That's what I am trying to block.

    To clarify the problem: default level name = "world_basis". I want the nether to be called "world_nether", but do not want to create a world called "world"
     
Thread Status:
Not open for further replies.

Share This Page