mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-09 06:17:37 +01:00
can TPC to your own areas.
This commit is contained in:
parent
cc3da82277
commit
ef4b78e4c2
7
init.lua
7
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.
|
-- 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)
|
local protected = minetest.is_protected(target_coords,pname)
|
||||||
if protected then
|
if protected then
|
||||||
minetest.chat_send_player(player, "Error: These coordinates are within a protected area.")
|
local owner_string = get_owner_string(target_coords)
|
||||||
return
|
if pname ~= owner_string then
|
||||||
|
minetest.chat_send_player(player, "Error: These coordinates are within a protected area.")
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
||||||
|
Loading…
Reference in New Issue
Block a user