Config files for each player

Discussion in 'Plugin Development' started by Chipmunk9998, Feb 11, 2012.

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

    Chipmunk9998

    Hey, I wanted to know if there way a way to make a file for each player that tracked their kills and deaths. I've seen plugins like Essentials that have a file for each player, but I couldn't figure out how to do it. Can someone help?
     
  2. Offline

    ZephyrSigmar

    Chipmunk9998
    Yes,there's,just make a new .yml file when a player joins the server and he has no .yml config yet.
    However,i prefer SQLite (it's a database format,like MySQL,but it's just a single .db file) which is more easily accesseble and with this method you can spare a lot of space + no need for file opening,closing on every kill which can be CPU heavy.
    Here is a pretty nice SQLite connector: http://www.zentus.com/sqlitejdbc/
    Just add it to your project,like the bukkit api,then create static methods.
    If you need help in it's using just tag me in this thread.
     
  3. It seems easier to do this with the Sync Plugin (search it on BukkitDev)

    Also I will now be using databases instead of the YML files. Since hearing this is faster I'll probably be setting PermissionsEx to work with a database.
     
  4. Offline

    efstajas

    Jesus, yes, please use an sql database. I had to delete a folder with 7000+ player files with ftp - you know, the ftp client can't say "Delete folder x", it can only say "Delete file 1 in folder x, file 2, file 3...", one by one, and then in the end, it can delete the actual folder. Especially with a low internet connection, this can take ages.
     
  5. Offline

    Taien

    That's a crappy ftp program then. Most of them can handle mass deletions. I use WinSCP which does it just fine.
     
  6. Offline

    efstajas

    Nah, my FTP client is actually really awesome :D AFAIK, it's not possible to delete a folder with ftp when something's still inside and I suppose your client does all the deleting in the background.
     
  7. I use Filezilla, its beast.
     
  8. Offline

    Taien

    That's right. When I delete a folder, it clears the contents first and then clears the folder.
     
Thread Status:
Not open for further replies.

Share This Page