Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by msdaniel924, Jun 18, 2018.
The way we all use, I think, is this
//To save the name
getConfig().set(player.getName()+".Name", player.getName() );
//To save the UUID
And you keep doing the same with everything you want to save
Nobody does that and shouldn’t do that. Always use the UUID as the key; names can change.
As for your storage options it depends on the scale of the data you’re saving. Flat file yml files are okay up to a certain point. Essentials is for example creating a folder with a file per user instead of a single file.
SQLite and MySQL are great options for large amounts of data. Though if you’re saving as little data as you mentioned you should be fine using a flat file to begin with.