Skip to content

Commit

Permalink
Add protection support to doors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed Feb 12, 2014
1 parent e134282 commit 3e2781b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mods/doors/init.lua
Expand Up @@ -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}
Expand Down

0 comments on commit 3e2781b

Please sign in to comment.