minetest.register_privilege

From Minetest Developer Wiki
Jump to navigation Jump to search
Mbox warning.png This page contains unofficial, low-quality Lua API documentation and is likely to be outdated or wrong. Do not rely on it!
For the official and up-to-date documentation, see Lua API Documentation.
Mbox warning.png This page has been proposed for deletion for the following reason: "Contains unofficial and potentially outdated, redundant and inconsistent Lua API information"
If you don't think that this page should be deleted, please explain why on the talk page.

Syntax

<source>minetest.register_privilege("name", privilege definition)</source>

Description

Registers privilege.

Privilege definition

Either <source enclose="none">"description text"</source> or <source enclose="none">{description = "description text",give_to_singleplayer = boolean}</source> could be used as a privilege definition.

Note that give_to_singleplayer is <source enclose="none">true</source> by default.

Examples

<source> minetest.register_privilege("interact", "Player can dig and place nodes.") </source>


<source> minetest.register_privilege("fly", { description = "Player can fly around using the free_move mode.", give_to_singleplayer= false, }) </source>