mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] Add function to get player privileges (#5933)
* [CSM] Add function to get player privileges + move related help functions to common * Added @Zeno- const
This commit is contained in:
parent
6c55874417
commit
c91a8c7061
7 changed files with 56 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue