Ty Cleere You cannot do it without shutting down the server. I'm not sure about multiple worlds though... You could try this: kicking all players unloading the world deleting the world folder
It is possible to delete a world, when you teleport all players out of the world, and kick all death players in the world and then wait some ticks with a scheduler and then use this: Code:java getServer().unloadWorld(wName, true); After doing this, it should be possible to delete the world. Edit: I use it in my plugin without any errors. Edit: But I donĀ“t think that this works for the mainworld.
Ty Cleere This might be it Code:java if (args.length == 1) { World playerworld = Bukkit.getWorld(player.getName() + "-world"); File playerworldfolder = new File(player.getName() + "-world"); Bukkit.getServer().unloadWorld((playerworld), isInitialized()); //unload world //delete world folder and all contents under the directory and delete the "playerworldfolder" OR "playerworld" if (!(playerworldfolder==null)){ // if the world folder is still there (meaning it didn't delete) then send a message saying "failed" sender.sendMessage("failed"); }}