From ef4b78e4c2e658da32aafe2b2f293c58b12aa520 Mon Sep 17 00:00:00 2001 From: NathanSalapat Date: Wed, 11 May 2016 16:06:15 -0500 Subject: [PATCH] can TPC to your own areas. --- init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index ddad85f..340a200 100644 --- a/init.lua +++ b/init.lua @@ -90,8 +90,11 @@ local function tpc_send(player,coordinates) -- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission. local protected = minetest.is_protected(target_coords,pname) if protected then - minetest.chat_send_player(player, "Error: These coordinates are within a protected area.") - return + local owner_string = get_owner_string(target_coords) + if pname ~= owner_string then + minetest.chat_send_player(player, "Error: These coordinates are within a protected area.") + return + end end minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)