Add nil checks for placer
This commit is contained in:
parent
3ae382c913
commit
a2d7678ffd
14 changed files with 72 additions and 53 deletions
|
@ -278,7 +278,7 @@ minetest.register_node("flowers:waterlily", {
|
|||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local player_name = placer:get_player_name()
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
|
||||
if def and def.on_rightclick then
|
||||
return def.on_rightclick(pointed_thing.under, node, placer, itemstack,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue