Creating Directory Not Working

Discussion in 'Spigot Plugin Development' started by Snowmite, Jun 25, 2016.

  1. Endermitey
    I am trying to make a directory when the plugin enables called "data", for some reason, it is not creating and no exception is thrown. Can anybody help?

    My Code:
    Code (Text):
        File userData;
        userData = new File (getDataFolder () + File.separator + "data");
        if(!userData.exists ()) {
           userData.mkdirs ();
         }catch(SecurityException e) {
           e.printStackTrace ();
  2. y u so bold?!?! And instead of doing getDataFolder() +..., use getDataFolder(),...

    EDIT: Don't create 2 threads for the same problem...