Table for player data

Just need to know if a table like this:

local playerDataTemplate = {
	maxServers = 1; -- amount of "plots" someone can have
	gems = 50;
	coins = 250;
	plots = {}; -- Plot names like: "Kai's cool shop", or "Shimp land"
	bannedStatus = {
		banned = false;
		banReason = "Example";
		admin = "Player";
		timeSpan = "90 Days.";
	};
	rank = "Player"; -- ex: Player, Admin, Owner
}

Would be efficient for player data.

Very simple question, I know, but this table has been getting on my nerves and I would like some criticism/reassurance on it.

Not sure what efficiency has to do with the structure of your data table unless I misunderstand the use of the word here, but the one suggestion I’d make is that if a player isn’t banned then you don’t actually store any ban information with their player data. If a player isn’t banned it doesn’t quite make sense for them to have a ban status table either. Assume no status table means they aren’t banned.

I’m also personally a fan of PascalCase for keys in data structures. Just looks cleaner that way.

1 Like

Noted! I knew there was something off about the “bannedStatus” part of the table, thank you!