diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-02-22 21:11:48 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-02-22 21:11:48 +0000 |
commit | 5d1f2e2c01ab772824dd6396dc432004f316dcff (patch) | |
tree | 4433b179b562076e5800b953c8a7418312fde627 | |
parent | 3e3e24dbefc75159dc442dec165ff141416659fb (diff) |
Added nil player check when digging protectors (thanks expertmm)
-rw-r--r-- | init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |