mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-16 03:06:47 -04:00
Fix some placer nil checks
This commit is contained in:
parent
a3b171e317
commit
70cf7a26fd
6 changed files with 18 additions and 18 deletions
|
@ -413,7 +413,8 @@ minetest.register_craftitem("carts:cart", {
|
|||
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
|
||||
{pos = pointed_thing.above}, true)
|
||||
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
if not minetest.is_creative_enabled(player_name) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue