06.12.2018, 03:35
I had the same problem, then ****** said me "What you are describing is what a database is for", I think you must switch to MySQL or SQLite(I mean not to change the whole saving system just add this only for top players thing)
like,
When you are registering players register them in database too like in files(by MySQL or SQLite whatever...) then when players quit save their stats in the database too. like you save them in files then You can make a command like /top but when player types this you must save player(online players) data again in the database .. so it's easy to write a query and get them from database
Then you can get the top players including offline players.. if you don't know how to write a query then post a comment, I will help you
like,
When you are registering players register them in database too like in files(by MySQL or SQLite whatever...) then when players quit save their stats in the database too. like you save them in files then You can make a command like /top but when player types this you must save player(online players) data again in the database .. so it's easy to write a query and get them from database
Then you can get the top players including offline players.. if you don't know how to write a query then post a comment, I will help you