From 35985b7dd16bd070940fe0bccf3ea9c54dae1a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sat, 20 Jan 2018 14:55:08 +0100 Subject: Fixed bug: drawers cloned items when dug without permission --- lua/api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/api.lua b/lua/api.lua index 740e33e..d12a17c 100755 --- a/lua/api.lua +++ b/lua/api.lua @@ -100,7 +100,10 @@ function drawers.drawer_on_dig(pos, node, player) if core.registered_nodes[node.name] then drawerType = core.registered_nodes[node.name].groups.drawer end - + if core.is_protected(pos,player:get_player_name()) then + core.record_protection_violation(pos,player:get_player_name()) + return 0 + end local meta = core.get_meta(pos) local k = 1 -- cgit v1.2.3