Delteing player.dat

Discussion in 'Spigot Plugin Help' started by AgentLV, Nov 16, 2014.

  1. The plugin works on my windows server, but it doesn't work on my ubuntu server. Does anyone have a clue? Maybe something with rights?
    Thanks for your help :)
     
  2. Hex

    Hex
    IRC Staff

    Which plugin exactly? If the plugin is trying to delete a file, then make sure the file has read/write permissions set correctly.
     
  3. Which files exactly should have read/write permissions?
     
  4. What is the plugin you're having problems with?
     
  5. Hex

    Hex
    IRC Staff

    Player.dat
    Anyways, what plugin is this?
     
  6. It's a selfcoded plugin
     
  7. maybe the directory doesn't exist.
    I use this.
    Code (Text):
    String file = e.getPlayer().getWorld().getWorldFolder().getPath() + "/playerdata/"+e.getPlayer().getUniqueId().toString()+".dat";
    later
    File f = new File(file);
    f.delete();<- return true if successful.
     
  8. This works on a linux server?
     
  9. Make sure you're using the right slashes. Linux and Windows use different file paths.
     
  10. Ok thanks alot guys :)
     
  11. Me and the other Admins are not quite sure, how useful it is to delete the player.dats. Does anyone have a 3rd opnion? :D
     
  12. Hex

    Hex
    IRC Staff

    What goal do you have in mind by deleting the player.dats?
     
  13. We decided to not delete them, beacause it could get laggy, with constant generating and deleting of files.