Deleting a file from a world folder

Discussion in 'Plugin Development' started by ThunderWaffeMC, Jul 9, 2013.

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

    ThunderWaffeMC

    I'm trying to delete a file from the world folder with:

    Code:java
    1.  
    2. World playerworld = Bukkit.getWorld(player.getName() + "-world");
    3. File uiddatafile = new File(playerworld.getWorldFolder().getPath() + "/uid.dat");
    4. uiddatafile.delete();
    5.  


    And it doesn't do anything. Does anyone know how to do this simply in the same format as what I have done?

    Thanks!
     
  2. Offline

    Chinwe

    It might have something to do with the fact it's being accessed/used by the server?
    Maybe try it on another computer/host?
    On some you can delete something while it's in use, in others you can't (I believe)
     
  3. Offline

    tills13

    Yeah - the issue is that it's loaded into the server... there's nothing you can do about that.
     
Thread Status:
Not open for further replies.

Share This Page