.DAT file going blank?

Discussion in 'Plugin Development' started by SoThatsIt, May 15, 2011.

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

    SoThatsIt

    my plugin uses a .dat file to save information and before i added
    FileInputStream in = new FileInputStream(mineCoins);
    prop.load(in);
    in.close();
    or
    FileOutputStream out = new FileOutputStream(mineCoins);
    prop.put(player.getName(), "50");
    out.flush();
    out.close();
    it worked fine

    anyone know what im doing wrong?
     
  2. You need to use prop.store method.

    Code:
    prop.store(out, "Some comment here");
    Add this statement after prop.put.....

    It'll work :)
     
  3. Offline

    SoThatsIt

    thanks it worked!
     
  4. No problem ;)
     
Thread Status:
Not open for further replies.

Share This Page