#Getting data from Offline Players

1 messages · Page 1 of 1 (latest)

frosty tapir
#

Hey guys!

So for my plugin, I'm storing additional player data for every player in the form of an yml file. Each player who joins the server will automatically have a yml file (the name of which is their UUID) created and all their custom data stored there.

This works fine, however if I need to find a specific offline player based on some specific data I've stored for them, looping through 4,000+ yml files and checking if it has the data is (surprise!) crashing my pc...

So my question is, what's a better way to do this 😛

Thanks!

dense fractal
#

Using a database is a pretty good solution to this, you can then get data that way..

buoyant tartan
#

i suggest using a database like mysql or store all users data in 1 yml file

frosty tapir
#

how would a database be different: Wouldn't it still be very difficult to loop through so many files?

#

I've never used databases before, so I know nothing about that topic :P

dense fractal
#

No since it doesn't store it as a separate file

#

for every entry

buoyant tartan
#

use something like mysql

#

its fast and good for alot of data

dense fractal
#

MySQL, SQLite and MongoDB are really good options

#

You can google how to use them

frosty tapir
#

and would that allow me to manually modify the individual player files if need be?

buoyant tartan
#

^

dense fractal
#

You can modify the data assigned to their UUID.

buoyant tartan
#

no but u can edit it using a panel

dense fractal
#

Ah that's what you mean

buoyant tartan
#

like php mysql something i forgot the name

dense fractal
#

^

frosty tapir
#

ah awesome, I will look into that

#

tysm!

dense fractal