Replace deprecated player attribute calls

This commit is contained in:
Wuzzy 2019-03-06 05:45:16 +01:00
parent 4c8433b41c
commit 2b3922c972
7 changed files with 33 additions and 29 deletions

View file

@ -107,7 +107,7 @@ minetest.register_globalstep(function(dtime)
if players[playerName]["shouldSprint"] == true then --Stopped
local sprinting
-- Prevent sprinting if hungry or sleeping
if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_attribute("mcl_beds:sleeping") == "true")then
if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_meta():get_string("mcl_beds:sleeping") == "true")then
sprinting = false
else
sprinting = true