Skip to content

Commit

Permalink
replace depricated get_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
SwissalpS committed Dec 10, 2021
1 parent f11424b commit eea43a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions death.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ minetest.register_on_dieplayer(function(player)
minetest.chat_send_player(player_name, "You died at " .. pos_string)

local bone_string = "Bones"
if player.get_attribute then
if player.get_meta then
-- [xp_redo] keeps track of deathcount, let's see if it is there
local count = player:get_attribute("died")
if count then
local count = player:get_meta():get_int("died")
if 0 < count then
bone_string = "Bone #" .. tostring(count)
end
end -- if not fake player
Expand Down

0 comments on commit eea43a7

Please sign in to comment.