Verify object is player before checking privs backported for mt 0.4.17 game
* backported 3a3f71aa50
* prevents a crash when a 'nil' digger is passed by the engine to minetest.node_dig
This commit is contained in:
parent
d18f9b4251
commit
812bb323f6
@ -543,7 +543,8 @@ minetest.register_abm({
|
|||||||
--
|
--
|
||||||
|
|
||||||
function default.can_interact_with_node(player, pos)
|
function default.can_interact_with_node(player, pos)
|
||||||
if player then
|
if player == nil then return false end
|
||||||
|
if player and player:is_player() then
|
||||||
if minetest.check_player_privs(player, "protection_bypass") then
|
if minetest.check_player_privs(player, "protection_bypass") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user