mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Add chatcommand unregister and override API (#5076)
Introduces two functions to unregister and override chatcommands. minetest.unregister_chatcommand("<name>") and minetest.override_chatcommand("<name>", {<redifinition>})
This commit is contained in:
parent
dd282e646c
commit
efa54f9c46
2 changed files with 22 additions and 0 deletions
|
@ -2077,6 +2077,10 @@ Call these functions only at load time!
|
|||
### Other registration functions
|
||||
* `minetest.register_chatcommand(cmd, chatcommand definition)`
|
||||
* Adds definition to minetest.registered_chatcommands
|
||||
* `minetest.override_chatcommand(name, redefinition)`
|
||||
* Overrides fields of a chatcommand registered with register_chatcommand.
|
||||
* `minetest.unregister_chatcommand(name)`
|
||||
* Unregisters a chatcommands registered with register_chatcommand.
|
||||
* `minetest.register_privilege(name, definition)`
|
||||
* `definition`: `"description text"`
|
||||
* `definition`: `{ description = "description text", give_to_singleplayer = boolean}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue