Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-1725

Secondary Scoreboard Health Objective not displaying

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version git-Spigot-dd155ed-3e3516e (MC: 1.9) (Implementing API version 1.9-R0.1-SNAPSHOT)

    • My own plugin

      So in 1.8 I was creating a scoreboard for mods that shows player health in the tablist and that works fine. (normal players have a separate scoreboard generated by the built in minecraft scoreboard commands).

      This is how I do it for the mods.

      Objective health = board.registerNewObjective("showhealth", "health");
      health.setDisplaySlot(DisplaySlot.PLAYER_LIST);

      It doesn't show the hearts on the tablist. They seem to register as each player at zero health. (which if I change it to display under the players names, it says 0 health).

      The scoreboard for normal players has the objective set like this from command line

      scoreboard objectives add health health
      scoreboard objectives setdisplay list health

      That scoreboard works fine for the players shows hearts and updates accordingly.

      I don't know if something has changed in 1.9 in regards to health, but I thought that the health method would automatically pull players health and keep the tablist updated. It does at least in 1.8 and it does for the scoreboard generated with the command line scoreboard command.

      When the scoreboard is first initialized you can see the 10 hearts flash and they go away.

            Unassigned Unassigned
            belboz belboz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: