mojira.dev
MC-126193

Health score tab problem

The problem is that when a player is available on the server and the server owner is just switching on the health tab, he reloads, but there are players on the server and players do not show the taboos beside their name the health level just a blank space. It only appears when the player re-connects to the server, but I do not want that.

Here is the code:

Scoreboard board = pl.getScoreboard();
Objective objective = board.getObjective("showhealth");
if (objective == null) {
 objective = board.registerNewObjective("showhealth", "health");
 objective.setDisplaySlot(DisplaySlot.PLAYER_LIST);
 objective.setDisplayName(ChatColor.RED + "");
}

Attachments

Comments 9

Invalid as this relates to a modified client, sercer or laubcher.

This is not modified because it only works with one code on a server.

Bukkit/Spigot and their variants are not vanilla versions, and therefore Mojang can't help you with that.

It's true, but I also reported to Spigot, but this mistake says they are a Minecraft problem.

Try making the player take damage, then re-heal them to update the scoreboard.
Works in vanilla.

That was good. But I do not want to exemplify a player having half health, just updating the server and the player dies. I've changed the damage to 0.1, but I do not want to.

Check if is there a method that can make the scoreboards update.

I did not find the right one. Here is a duplicate: click

Mojang plz add fix, montilkadani has been trying everything they can to get this working properly and it's still persisting in 1.13+ 1.14+

The 1st player that joins after the server starts hearts won't display in tablist but every other player after has it and they(1st player that joined) have to re-join each time this happens

montlikadani

(Unassigned)

Unconfirmed

Multiplayer, displayslot, health-tab, objectives, player-list, tab, tablist

Minecraft 1.12.2

Retrieved