mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-24 02:11:31 +01:00
Added nil player check when digging protectors (thanks expertmm)
This commit is contained in:
parent
3e3e24dbef
commit
5d1f2e2c01
4
init.lua
4
init.lua
@ -442,7 +442,7 @@ minetest.register_node("protector:protect", {
|
||||
|
||||
can_dig = function(pos, player)
|
||||
|
||||
return protector.can_dig(1, pos, player:get_player_name(), true, 1)
|
||||
return player and protector.can_dig(1, pos, player:get_player_name(), true, 1)
|
||||
end,
|
||||
|
||||
on_blast = function() end,
|
||||
@ -522,7 +522,7 @@ minetest.register_node("protector:protect2", {
|
||||
|
||||
can_dig = function(pos, player)
|
||||
|
||||
return protector.can_dig(1, pos, player:get_player_name(), true, 1)
|
||||
return player and protector.can_dig(1, pos, player:get_player_name(), true, 1)
|
||||
end,
|
||||
|
||||
on_blast = function() end,
|
||||
|
Loading…
Reference in New Issue
Block a user