Hi ! All is in the title : How can I delete a World ? Only at the onDisable(). Thanks EDIT: I want to delete all worlds.
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.)
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.