diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-07-15 07:22:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-15 07:22:58 -0400 |
commit | ea5ffafb9c012d436ac209be32e3d82e35eb21a5 (patch) | |
tree | 8ed56bdc0f9637752e4231944d57f60f2dc81e7d | |
parent | 8c0d0309f101aade225ca4ecf1a1edfa1c573f60 (diff) | |
parent | 310ec1da81a51a880221ed01e5ff0dc3d2377cdd (diff) |
Merge pull request #49 from HybridDog/proller_suggestion
Stop flooding connected clients by all detached inventories if freemiā¦
-rw-r--r-- | callbacks.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/callbacks.lua b/callbacks.lua index 392e855..9387154 100644 --- a/callbacks.lua +++ b/callbacks.lua @@ -187,3 +187,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) unified_inventory.current_page[player_name]) end) +if minetest.delete_detached_inventory then + minetest.register_on_leaveplayer(function(player) + local player_name = player:get_player_name() + minetest.delete_detached_inventory(player_name.."_bags") + minetest.delete_detached_inventory(player_name.."craftrecipe") + minetest.delete_detached_inventory(player_name.."refill") + end) +end |