minetest.register_privilege

From Minetest Developer Wiki
Jump to navigation Jump to search

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>