summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@linuxworks.belug.de>2018-01-20 14:55:03 +0100
committerroot <root@linuxworks.belug.de>2018-01-20 14:55:03 +0100
commit6b4586117056078a36f1561446d0c757728660e2 (patch)
treee32c09eb845eb24dca0124e3446f3e6b7f677426
parenteb0e44de339e32071ed89b1265c1e8958281a9b5 (diff)
parent35985b7dd16bd070940fe0bccf3ea9c54dae1a9f (diff)
Merge https://github.com/gpcf/drawers
-rwxr-xr-xlua/api.lua5
1 files changed, 4 insertions, 1 deletions
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