fake player bugfix

This commit is contained in:
Joachim Stolberg 2020-07-29 19:45:55 +02:00
parent 8e94e6a2cb
commit 43cf33698a
2 changed files with 2 additions and 2 deletions

@ -156,7 +156,7 @@ end
-- Decrement sapling points -- Decrement sapling points
-- --
local function after_place_sapling(pos, placer) local function after_place_sapling(pos, placer)
if placer and placer:is_player and placer:is_player() and placer:get_attribute then if placer and placer.is_player and placer:is_player() and placer.get_attribute then
local points = tonumber(placer:get_attribute("lumberjack_sapl_points") or LUMBERJACK_SAPL_POINTS) local points = tonumber(placer:get_attribute("lumberjack_sapl_points") or LUMBERJACK_SAPL_POINTS)
if points > 0 then if points > 0 then
placer:set_attribute("lumberjack_sapl_points", tostring(points - 1)) placer:set_attribute("lumberjack_sapl_points", tostring(points - 1))