mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-30 13:50:23 +02:00
Add nil checks for placer
This commit is contained in:
@ -319,7 +319,7 @@ end
|
||||
-- Prevent decay of placed leaves
|
||||
|
||||
default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and not placer:get_player_control().sneak then
|
||||
if placer and placer:is_player() and not placer:get_player_control().sneak then
|
||||
local node = minetest.get_node(pos)
|
||||
node.param2 = 1
|
||||
minetest.set_node(pos, node)
|
||||
|
Reference in New Issue
Block a user