Updating tab health

Discussion in 'Plugin Development' started by Ak1ra, Feb 4, 2025 at 12:57 PM.

  1. Offline

    Ak1ra

    I am making a plugin using scoreboards, I want the fancy hearts in the tab list using this:

    Objective hearts = sb.registerNewObjective("hearts",Criteria.HEALTH,"hp",RenderType.HEARTS);

    unfortunately, the hearts are gone until the player gets damaged. I tried what I saw in other threads like
    p.setHealth(p.getHealth()); or
    p.sendHealthUpdate();
    but none of these make a difference. Is there a way to show the health right after setting the scoreboard?
     

Share This Page