mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 05:50:17 +02:00
Use empty string for protection check if puncher or clicker is nil.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user