mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-08 14:07:28 +01:00
Added areas support
This commit is contained in:
parent
4dd4591d4f
commit
c1fedad691
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
areas
|
2
init.lua
2
init.lua
@ -90,7 +90,7 @@ 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
|
||||||
local owner_string = get_owner_string(target_coords)
|
local owner_string = areas:getNodeOwners(target_coords)
|
||||||
if pname ~= owner_string then
|
if pname ~= owner_string then
|
||||||
minetest.chat_send_player(player, "Error: These coordinates are within a protected area.")
|
minetest.chat_send_player(player, "Error: These coordinates are within a protected area.")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user