diff options
author | Weblate <noreply@weblate.org> | 2017-10-16 19:11:11 +0200 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-10-16 19:11:11 +0200 |
commit | 7a5cc96e21b2c00ad0ec23912397606406a6f566 (patch) | |
tree | b6c089feb1055ee5012d8b4265188169a888e241 | |
parent | 0790e0f2586fd2bef7a07a42f9a91caa93b61b24 (diff) | |
parent | 245e0a6e97b0e6419b3e50438999f625fdeb681c (diff) |
Merge remote-tracking branch 'origin/master'
-rwxr-xr-x | lua/api.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/api.lua b/lua/api.lua index 736a8fb..ad32a3f 100755 --- a/lua/api.lua +++ b/lua/api.lua @@ -144,6 +144,10 @@ function drawers.drawer_on_dig(pos, node, player) end function drawers.drawer_allow_metadata_inventory_put(pos, listname, index, stack, player) + if core.is_protected(pos,player:get_player_name()) then + core.record_protection_violation(pos,player:get_player_name()) + return 0 + end if listname ~= "upgrades" then return 0 end @@ -198,6 +202,7 @@ function drawers.register_drawer(name, def) def.on_destruct = drawers.drawer_on_destruct def.on_dig = drawers.drawer_on_dig def.allow_metadata_inventory_put = drawers.drawer_allow_metadata_inventory_put + def.allow_metadata_inventory_take = drawers.drawer_allow_metadata_inventory_put def.on_metadata_inventory_put = drawers.add_drawer_upgrade def.on_metadata_inventory_take = drawers.remove_drawer_upgrade |