summaryrefslogtreecommitdiff
path: root/callbacks.lua
diff options
context:
space:
mode:
authorBadToad2000 <jameson.miller@outlook.com>2016-07-17 02:05:29 -0500
committerBadToad2000 <jameson.miller@outlook.com>2016-07-17 02:05:29 -0500
commit5da8914da9e2ff749dd3a3584e4e721656d1a312 (patch)
treeeda897a637ec961284cf9d6391bff0efab859e4b /callbacks.lua
parent3cdfdd14a5ac1de36f41981a6ed69b0f9f2fd90d (diff)
parentea5ffafb9c012d436ac209be32e3d82e35eb21a5 (diff)
Merge remote-tracking branch 'main/master' into use_smaller_bag
Merging at VenessaE's request to potentially get this change marged into Unified Inventory.
Diffstat (limited to 'callbacks.lua')
-rw-r--r--callbacks.lua8
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