Deleting a world file

Discussion in 'Plugin Development' started by diamondcodes, Jan 31, 2015.

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

    diamondcodes

    Hello,
    I am working on a plugin that requires the world file to delete every time the server is shutting down. How would I do this?

    Thanks.
     
  2. Offline

    caderape

    the method new File() go back to the folder with all the worlds. so check the folders in the folder of your world(data, player) then loops all the existing file in the folder.

    File f = new File("worldname/data");
    for (File b : f.listfiles()){
    b.delete();}
     
Thread Status:
Not open for further replies.

Share This Page