mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-27 11:10:40 +01:00
update player location
update player location when protected
This commit is contained in:
parent
289d0e623c
commit
6cad881b6f
@ -1,7 +1,10 @@
|
||||
|
||||
local old_is_protected = minetest.is_protected
|
||||
function minetest.is_protected(pos, name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local playerpos = player:getpos()
|
||||
if not areas:canInteract(pos, name) then
|
||||
player:setpos(playerpos)
|
||||
return true
|
||||
end
|
||||
return old_is_protected(pos, name)
|
||||
|
Loading…
Reference in New Issue
Block a user