mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-28 03:30:36 +01:00
Fix crash if technic mod is loaded and when a player want to move items from his inventory to a locked chest.
This commit is contained in:
parent
7701d61b55
commit
7779f0333a
@ -487,3 +487,27 @@ function default.intersects_protection(minp, maxp, player_name, interval)
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- NOTICE: This method is not an official part of the API yet!
|
||||||
|
-- This method may change in future.
|
||||||
|
--
|
||||||
|
|
||||||
|
function default.can_interact_with_node(player, pos)
|
||||||
|
if player then
|
||||||
|
if minetest.check_player_privs(player, "protection_bypass") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local owner = meta:get_string("owner")
|
||||||
|
|
||||||
|
if not owner or owner == "" or owner == player:get_player_name() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user