aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-30 01:45:23 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-30 01:45:23 +0300
commitb9ffb5f30d64d365e6792d0d3acff552d9fcd0fd (patch)
treeb4b3c2d055d7ff39688e0a51f57f06106511370b /doc
parent9d456ca87a96d9150c87e1de760e2668c128b459 (diff)
downloadminetest-b9ffb5f30d64d365e6792d0d3acff552d9fcd0fd.tar.gz
minetest-b9ffb5f30d64d365e6792d0d3acff552d9fcd0fd.tar.bz2
minetest-b9ffb5f30d64d365e6792d0d3acff552d9fcd0fd.zip
minetest.register_chatcommand(cmd, def)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index caa5514b7..740f73b07 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -499,6 +499,7 @@ minetest.register_on_respawnplayer(func(ObjectRef))
^ return true in func to disable regular player placement
^ currently called _before_ repositioning of player occurs
minetest.register_on_chat_message(func(name, message))
+minetest.register_chatcommand(cmd, chatcommand definition)
minetest.add_to_creative_inventory(itemstring)
minetest.setting_get(name) -> string or nil
@@ -507,6 +508,7 @@ minetest.setting_getbool(name) -> boolean value or nil
minetest.chat_send_all(text)
minetest.chat_send_player(name, text)
minetest.get_player_privs(name) -> set of privs
+minetest.check_player_privs(name, {priv1=true,...}) -> bool, missing_privs
minetest.get_inventory(location) -> InvRef
^ location = eg. {type="player", name="celeron55"}
{type="node", pos={x=, y=, z=}}
@@ -858,4 +860,11 @@ Recipe (furnace fuel):
burntime = 1,
}
+Chatcommand definition (register_chatcommand)
+{
+ params = "<name> <privilege>", -- short parameter description
+ description = "Remove privilege from player", -- full description
+ privs = {privs=true}}, -- require the "privs" privilege to run
+ func = function(name, param), -- called when command is run
+}