1
0
mirror of https://github.com/Sokomine/replacer.git synced 2025-07-04 09:00:45 +02:00

added support for new minetest.is_protected

This commit is contained in:
Sokomine
2013-11-20 21:50:38 +01:00
parent 8a940cff91
commit d0c891d83d
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,12 @@
-- taken from Vanessa Ezekowitz' homedecor mod
-- see http://forum.minetest.net/viewtopic.php?pid=26061 or https://github.com/VanessaE/homedecor for details!
function replacer_homedecor_node_is_owned(pos, placer)
if type( minetest.is_protected == "function") then
return minetest.is_protected( pos, placer:get_player_name() );
end
local ownername = false
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
if HasOwner(pos, placer) then -- returns true if the node is owned