summaryrefslogtreecommitdiff
path: root/mesecons_noteblock
diff options
context:
space:
mode:
authorauouymous <au@qzx.com>2020-12-10 03:53:50 -0700
committerVitaliy <numzer0@yandex.ru>2020-12-19 23:11:20 +0300
commit397d449f1e668ceb8939626e018fc98ef72abbd3 (patch)
treec307bf501270876ad1072626534c7e5e47bffb2c /mesecons_noteblock
parent29ec26a4c851d76e4a2ca21949bff94fe37eeccd (diff)
downloadmesecons-397d449f1e668ceb8939626e018fc98ef72abbd3.tar
mesecons-397d449f1e668ceb8939626e018fc98ef72abbd3.tar.gz
mesecons-397d449f1e668ceb8939626e018fc98ef72abbd3.tar.bz2
mesecons-397d449f1e668ceb8939626e018fc98ef72abbd3.tar.xz
mesecons-397d449f1e668ceb8939626e018fc98ef72abbd3.zip
Use empty string for protection check if puncher or clicker is nil.
Diffstat (limited to 'mesecons_noteblock')
-rw-r--r--mesecons_noteblock/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesecons_noteblock/init.lua b/mesecons_noteblock/init.lua
index 577cee0..40e2577 100644
--- a/mesecons_noteblock/init.lua
+++ b/mesecons_noteblock/init.lua
@@ -4,7 +4,7 @@ minetest.register_node("mesecons_noteblock:noteblock", {
is_ground_content = false,
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
on_punch = function(pos, node, puncher) -- change sound when punched
- if minetest.is_protected(pos, puncher and puncher:get_player_name()) then
+ if minetest.is_protected(pos, puncher and puncher:get_player_name() or "") then
return
end