return
end
+ if minetest.is_protected(pt.under, user:get_player_name()) then
+ minetest.record_protection_violation(pt.under, user:get_player_name())
+ return
+ end
+ if minetest.is_protected(pt.above, user:get_player_name()) then
+ minetest.record_protection_violation(pt.above, user:get_player_name())
+ return
+ end
+
+
-- turn the node into soil, wear out item and play sound
minetest.set_node(pt.under, {name = regN[under.name].soil.dry})
minetest.sound_play("default_dig_crumbly", {
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
+ if minetest.is_protected(pt.under, placer:get_player_name()) then
+ minetest.record_protection_violation(pt.under, placer:get_player_name())
+ return
+ end
+ if minetest.is_protected(pt.above, placer:get_player_name()) then
+ minetest.record_protection_violation(pt.above, placer:get_player_name())
+ return
+ end
+
+
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return