diff options
author | gpcf <gabriel@gpcf.eu> | 2018-02-07 20:40:28 +0100 |
---|---|---|
committer | LNJ <git@lnj.li> | 2018-02-07 20:40:28 +0100 |
commit | 336027fbd76557cde7fc8165200541598eb2b611 (patch) | |
tree | e32c09eb845eb24dca0124e3446f3e6b7f677426 /lua | |
parent | aa287af788b80c239dd2fb62a1d12589e2ec6881 (diff) |
Check protection violations on digging drawer (#16)
Diffstat (limited to 'lua')
-rwxr-xr-x | lua/api.lua | 5 |
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 |