summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-05-06 20:12:44 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-05-06 21:12:44 +0200
commit5ebf8f945050e9c74a3bb6784a0844d1fb68bdff (patch)
tree474c9f798c7624c659dd16aa11a4d097cd16b5b4 /doc
parent6658ad3d94c053eeed12bb79e255cdfa46831e19 (diff)
downloadminetest-5ebf8f945050e9c74a3bb6784a0844d1fb68bdff.tar.gz
minetest-5ebf8f945050e9c74a3bb6784a0844d1fb68bdff.tar.bz2
minetest-5ebf8f945050e9c74a3bb6784a0844d1fb68bdff.zip
[CSM] add `on_item_use` (#5544)
Diffstat (limited to 'doc')
-rw-r--r--doc/client_lua_api.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md
index a4293500f..19947a525 100644
--- a/doc/client_lua_api.md
+++ b/doc/client_lua_api.md
@@ -669,6 +669,10 @@ Call these functions only at load time!
* If any function returns true, the punch is ignored
* `minetest.register_on_placenode(function(pointed_thing, node))`
* Called when a node has been placed
+* `minetest.register_on_item_use(func(item, pointed_thing))`
+ * Called when the local player uses an item.
+ * Newest functions are called first.
+ * If any function returns true, the item use is not sent to server.
### Sounds
* `minetest.sound_play(spec, parameters)`: returns a handle
* `spec` is a `SimpleSoundSpec`