diff --git a/check_owner.lua b/check_owner.lua index f9ac907..f8e843f 100644 --- a/check_owner.lua +++ b/check_owner.lua @@ -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 diff --git a/init.lua b/init.lua index d2605c5..4a2e4e9 100644 --- a/init.lua +++ b/init.lua @@ -21,6 +21,8 @@ -- Version 2.0 -- Changelog: +-- 20.11.2013 * if the server version is new enough, minetest.is_protected is used +-- in order to check if the replacement is allowed -- 24.04.2013 * param1 and param2 are now stored -- * hold sneak + right click to store new pattern -- * right click: place one of the itmes