diff options
author | Elijah Duffy <enduffy2014@outlook.com> | 2017-01-20 10:49:20 -0800 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-01-20 19:49:20 +0100 |
commit | efa54f9c460239c23a2014076764d6c6830589e6 (patch) | |
tree | 0bb14829ddbc8ae222c225bbcc3fbf220917d41e /doc | |
parent | dd282e646c42e3524bc546372c6a648e99b3c9db (diff) | |
download | minetest-efa54f9c460239c23a2014076764d6c6830589e6.tar.gz minetest-efa54f9c460239c23a2014076764d6c6830589e6.tar.bz2 minetest-efa54f9c460239c23a2014076764d6c6830589e6.zip |
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>})
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 9bdc01c07..aada851a1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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}` |