summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 72e92df..3499ad8 100644
--- a/init.lua
+++ b/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,