diff options
author | red-001 <red-001@outlook.ie> | 2017-06-07 08:09:06 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-07 09:09:06 +0200 |
commit | c91a8c7061c83a33cca929859ea811afb985ac0a (patch) | |
tree | 28d90cc8f57d35eedb2d25ffd6456ffddb80adf1 /doc | |
parent | 6c558744179b52607d552d28bf6cc6a4e49a2a14 (diff) | |
download | minetest-c91a8c7061c83a33cca929859ea811afb985ac0a.tar.gz minetest-c91a8c7061c83a33cca929859ea811afb985ac0a.tar.bz2 minetest-c91a8c7061c83a33cca929859ea811afb985ac0a.zip |
[CSM] Add function to get player privileges (#5933)
* [CSM] Add function to get player privileges + move related help functions to common
* Added @Zeno- const
Diffstat (limited to 'doc')
-rw-r--r-- | doc/client_lua_api.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md index 1375e1355..42d2bfbbf 100644 --- a/doc/client_lua_api.md +++ b/doc/client_lua_api.md @@ -730,6 +730,13 @@ Call these functions only at load time! * `minetest.localplayer` * Reference to the LocalPlayer object. See [`LocalPlayer`](#localplayer) class reference for methods. +### Privileges +* `minetest.get_privilege_list()` + * Returns a list of privileges the currect player has in the format `{priv1=true,...}` +* `minetest.string_to_privs(str)`: returns `{priv1=true,...}` +* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."` + * Convert between two privilege representations + ### Client Environment * `minetest.get_player_names()` * Returns list of player names on server |