mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-10 13:57:32 +01:00
added nil check for is_protected digger name
This commit is contained in:
parent
20c6d2b9b9
commit
f8eab51e67
2
init.lua
2
init.lua
@ -264,6 +264,8 @@ protector.old_is_protected = minetest.is_protected
|
|||||||
-- check for protected area, return true if protected and digger isn't on list
|
-- check for protected area, return true if protected and digger isn't on list
|
||||||
function minetest.is_protected(pos, digger)
|
function minetest.is_protected(pos, digger)
|
||||||
|
|
||||||
|
digger = digger or "" -- nil check
|
||||||
|
|
||||||
-- is area protected against digger?
|
-- is area protected against digger?
|
||||||
if not protector.can_dig(protector.radius, pos, digger, false, 1) then
|
if not protector.can_dig(protector.radius, pos, digger, false, 1) then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user