diff --git a/init.lua b/init.lua index 2764a1c..831878c 100644 --- a/init.lua +++ b/init.lua @@ -155,14 +155,14 @@ basic_protect.protect_new = function(p,name) if skyblock and skyblock.players and skyblock.get_island_pos then local skyid = skyblock.players[name].id; local skypos = skyblock.get_island_pos(skyid); - local dist = math.max(math.abs(p.x-skypos.x),math.abs(p.y-skypos.y),math.abs(p.z-skypos.z)); - if dist>skyblock.islands_gap then + local dist = math.max(math.abs(p.x-skypos.x),math.abs(p.z-skypos.z)); + if dist>skyblock.islands_gap then local privs = minetest.get_player_privs(name); if not privs.kick then local meta = minetest.get_meta(skypos); local mstring = meta:get_string("infotext"); if string.find(mstring,"ISLAND") then -- tried to protect other island - minetest.chat_send_player(name, "#PROTECTOR: you can only protect empty space or your island") + minetest.chat_send_player(name, "#PROTECTOR: you can only protect empty space or your island or above it") minetest.set_node(p,{name = "air"}) -- clear protector return end