Delete a World

Discussion in 'Plugin Development' started by Skyost, Aug 30, 2013.

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

    Skyost

    Hi !
    All is in the title : How can I delete a World ?
    Only at the onDisable().
    Thanks ;)

    EDIT: I want to delete all worlds.
     
  2. Skyost Scan all folder, and then if it contains level.dat delete it? (Or maybe there's even a world.getDirectory() method in bukkit which returns the folder so you can just loop trough the worlds and do your thing. Not sure if it exists though.)
     
  3. Offline

    Nateb1121


    Ya, you'd have to do something outside of Bukkit API, such as what Capt said. You'd have to be very careful on how you do it, though. To delete the whole world you'd have to delete its parent directory (so, "world") which will include all of its region files, player files, etc.

    Fixed, sorry 'bout that Captain.
     
  4. Nateb1121 You do realize you quoted me instead of the op?
    Edit: No problem ;p
     
Thread Status:
Not open for further replies.

Share This Page