User settings API
#1
I'm proposing addition of simple database api to the core / mc-server (that'd be a better idea but, I most likely won't have time to do it):

GetUserSetting(username, settingname)
SetUserSetting(username, settingname, value)

And, possibly support for sqlite transactions

StartSettingsTransaction()
EndSettingsTransaction()

The table structure would be simple: UserName SettingName Value

It'd solve persistent storage of things like god-mode, money, or any other player-related value in a simple way.

Ps. Do we want /mail in Core?
Reply
Thanks given by:
#2
Please, no /mail command in the core plugin.
I hate this function.

What datatype should GetUserSetting return?
And data save with the player name is a very bad idea. We should save the uuid from the player
Reply
Thanks given by:
#3
Storing uuid's instead of names is a good idea, but the API user decides what to put there.
It'd be string (TEXT in the database) due to its relative versatility.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)