Skip to content
Snippets Groups Projects
Commit 3e2781bc authored by ShadowNinja's avatar ShadowNinja
Browse files

Add protection support to doors

parent e1342820
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,12 @@ function doors:register_door(name, def)
then
return itemstack
end
if minetest.is_protected(pt, placer:get_player_name()) or
minetest.is_protected(pt2, placer:get_player_name()) then
minetest.record_protection_violation(pt, placer:get_player_name())
return itemstack
end
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment