summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bags.lua3
-rw-r--r--callbacks.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/bags.lua b/bags.lua
index 497a9f8..2a21d5d 100644
--- a/bags.lua
+++ b/bags.lua
@@ -48,6 +48,9 @@ for i = 1, 4 do
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
+ if formname ~= "" then
+ return
+ end
for i = 1, 4 do
if fields["bag"..i] then
local stack = player:get_inventory():get_stack("bag"..i, 1)
diff --git a/callbacks.lua b/callbacks.lua
index 53601b0..fe76543 100644
--- a/callbacks.lua
+++ b/callbacks.lua
@@ -49,6 +49,9 @@ minetest.register_on_joinplayer(function(player)
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
+ if formname ~= "" then
+ return
+ end
local player_name = player:get_player_name()
for i, def in pairs(unified_inventory.buttons) do