Skip to content

Commit 3e2781b

Browse files
committedFeb 12, 2014
Add protection support to doors
1 parent e134282 commit 3e2781b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎mods/doors/init.lua

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ function doors:register_door(name, def)
5959
then
6060
return itemstack
6161
end
62+
63+
if minetest.is_protected(pt, placer:get_player_name()) or
64+
minetest.is_protected(pt2, placer:get_player_name()) then
65+
minetest.record_protection_violation(pt, placer:get_player_name())
66+
return itemstack
67+
end
6268

6369
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
6470
local pt3 = {x=pt.x, y=pt.y, z=pt.z}

0 commit comments

Comments
 (0)
Please sign in to comment.