From c38985825f299999135cc01aaf0052ec9138135a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 26 Nov 2016 17:35:25 +0100 Subject: 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. --- doc/lua_api.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/lua_api.txt') 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 -- cgit v1.2.3