How to delete a world via the bukkit API

Discussion in 'Plugin Development' started by Chicken325, Aug 6, 2012.

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

    Chicken325

    How do I delete a world with a specific name in bukkit? I suppose the function can assume no players are inside it, because I know how to force all the players out myself.
     
  2. Offline

    zajacmp3

    I would do this like that
    Code:
            this.getServer().unloadWorld("world", true);
            File world_files = new File("world/");
            world_files.delete();
     
    MnMaxon likes this.
  3. Offline

    njb_said

    would you put this in onEnable()???

    Cause im coding a hg plugin and need it to delete world :p
    (sorry for old thread)
     
  4. Offline

    fireblast709

    you can't delete world, world_nether and world_the_end while the server is running
     
  5. Offline

    njb_said

    I know that.
    Ive worked it out anyway.

    onDisable()
    kickall players
    unload world
    delete world


    then when server restarts it will regen world using our terraincontrol files.
     
Thread Status:
Not open for further replies.

Share This Page