I'm making a minigame and I need to know the best way to save player stats. Like wins. How would I do this. Would I use books, signs, config. I made another minigame and every time the config got more then 3000 player stats in it it started crashing. How could I make it less lagy. Note: I do not need to get top player and I am only storing one number.
Only way I could see storing data such as this is a file. It does not have to be the main config though.
MySQL, SQLite, JSON, YAML, XML, TXT, any other SQL manager (Postgre). The list goes on and on, you just need to decide what you want Edit: re: sql. Have you worked with SQL in any way at all in the past?
1Rogue I have never used SQL. Which one should I learn. And I only need to know the 4 basics. Getting data, adding data, changing data, saving it.
I would recommend using SQLite then. If you want an idea of what it would look like for use, take a look at my SQLite implementation within one of my plugins, linked below. Keep in mind you will need to learn SQL syntax, which I can potentially link a resource to below. My implementation: https://github.com/1Rogue/PlayTime/tree/master/src/main/java/com/rogue/playtime/data/sqlite Sql guide (not the best): http://www.w3schools.com/sql/ I really discourage w3schools for most things but overall I don't know many good ways to get started with sql.
Can you just give me examples of: Getting data: Saving data: Adding data: Changing data: I'm looking at your code too. Edit: Is it possible for me to use the code from your classes you sent me and use methods to do the things above.
You're welcome to use the instantiable SQLite class: https://github.com/1Rogue/PlayTime/...va/com/rogue/playtime/data/sqlite/SQLite.java Just leave the accreditation within it. Though you will have to modify it slightly To use it, simply make sure you've created the appropriate file, and then you can load it using SQLite. As for getting/saving/adding/changing data, those are all done through update and query strings.