From 76da7309d21c608ec85901a7126a3541e1e2c357 Mon Sep 17 00:00:00 2001 From: jp Date: Thu, 6 Aug 2015 20:22:44 +0200 Subject: [PATCH] Mailbox : prevent digging if inv ain't empty --- mailbox.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mailbox.lua b/mailbox.lua index 9bd3abc..a390301 100644 --- a/mailbox.lua +++ b/mailbox.lua @@ -34,7 +34,8 @@ xdecor.register("mailbox", { local owner = meta:get_string("owner") local inv = meta:get_inventory() - return player:get_player_name() == owner and inv:is_empty("main") + if not inv:is_empty("main") then return false end + return player:get_player_name() == owner end, on_metadata_inventory_put = function(pos, listname, index, stack, player) local meta = minetest.get_meta(pos)