aboutsummaryrefslogtreecommitdiff
path: root/builtin/misc_helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/misc_helpers.lua')
-rw-r--r--builtin/misc_helpers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/misc_helpers.lua b/builtin/misc_helpers.lua
index 623476915..8b2d493b7 100644
--- a/builtin/misc_helpers.lua
+++ b/builtin/misc_helpers.lua
@@ -302,6 +302,12 @@ if minetest then
iswall = false
end
+ if minetest.is_protected(pos, placer:get_player_name()) then
+ minetest.record_protection_violation(pos,
+ placer:get_player_name())
+ return
+ end
+
local ndef = minetest.registered_nodes[node.name]
if not ndef or not ndef.buildable_to then
return