summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2016-11-26 17:35:25 +0100
committersfan5 <sfan5@live.de>2016-11-28 13:41:19 +0100
commitc38985825f299999135cc01aaf0052ec9138135a (patch)
treec54db1b2f7e8a27dd5c1d693c6e0ee92386271b9 /doc/lua_api.txt
parent2fe3bf5a18eb9aa9f38654b3c0a0729c42408cd6 (diff)
downloadminetest-c38985825f299999135cc01aaf0052ec9138135a.tar.gz
minetest-c38985825f299999135cc01aaf0052ec9138135a.tar.bz2
minetest-c38985825f299999135cc01aaf0052ec9138135a.zip
Allow restricting detached inventories to one player
This combats the problem of sending the hundreds of "creative" / "armor" or whatever detached invs that exist on popular servers to each and every player on join or on change of said invs.
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 9da0fb4f9..eb47270f4 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2310,8 +2310,11 @@ and `minetest.auth_reload` call the authetification handler.
* `{type="player", name="celeron55"}`
* `{type="node", pos={x=, y=, z=}}`
* `{type="detached", name="creative"}`
-* `minetest.create_detached_inventory(name, callbacks)`: returns an `InvRef`
+* `minetest.create_detached_inventory(name, callbacks, [player_name])`: returns an `InvRef`
* callbacks: See "Detached inventory callbacks"
+ * player_name: Make detached inventory available to one player exclusively,
+ by default they will be sent to every player (even if not used).
+ Note that this parameter is mostly just a workaround and will be removed in future releases.
* Creates a detached inventory. If it already exists, it is cleared.
* `minetest.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed_thing)`:
returns left over ItemStack