Skip to content

Commit

Permalink
also add empty owner check for tool
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Dec 2, 2020
1 parent b570c56 commit 40fc6ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
end

-- when using protector as tool, show protector information
if infolevel == 2 then
if infolevel == 2 and owner ~= "" then

minetest.chat_send_player(digger,
S("This area is owned by @1", owner) .. ".")
Expand All @@ -283,7 +283,6 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)

return false
end

end

-- show when you can build on unprotected area
Expand Down

0 comments on commit 40fc6ef

Please sign in to comment.