I cannot delete the world folder??

Discussion in 'Plugin Development' started by OHQCraft, Jul 12, 2014.

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

    OHQCraft

    I am working on a minigame and need to delete the last world folder and paste a new one in every time it restarts. I load the plugin before the worlds get loaded, but I get denied access to the world folder, even though it is not loaded. I have made sure it is possible to access.

    This is the error I get:
    Code:
    java.io.FileNotFoundException: world (Access is denied)
     
  2. Offline

    PandazNWafflez

    Do you have administrator privileges? Is this on a hosted server?
     
  3. Offline

    OHQCraft

    It is on Windows where we don't have stupid file perms and yes I do have admin privileges.
     
  4. Offline

    PandazNWafflez

    Hmm. I don't really know whether Craftbukkit has code to prevent this, so I can't help you, sorry.
     
  5. Offline

    nzkiwi.5000

    Hmm, if you were on linux (most dedicated hostings have servers on linux) you could try dispatching
    Code:
    rm -rf <pathToWorldFolder>
    but on windows there is no other way i think.

    But if you are on windows we need to think a bit.

    How about having that arena (or something that has to be reset) in a schematic file inside a jar and manipulate world object?
     
  6. Offline

    Luke_Lax

    Perhaps you can't delete it because it's being used by the server..? Like try editing a file that another program has open in read only mode.
     
  7. Offline

    ResultStatic

    OHQCraft i was able to delete the world onLoad or onDisable i cant remeber, but it would regenerate a new one perfect for hg/sg, i even had it hooked up to terraincontrol.
     
Thread Status:
Not open for further replies.

Share This Page