New Scoreborad API

Discussion in 'Plugin Development' started by Spikes, Apr 4, 2013.

Thread Status:
Not open for further replies.
  1. Offline



    Has anyone ever dealt with the new Scoreboard API?
    If so, could someone give me show the way how I get the health displayed under the name.
    Also it is possible to display the health for the players that are in a ArrayList<Player>?

    - Spikes
  2. Offline


  3. Offline


    I think he's referring to the bukkit API for scoreboards: , not a hack to use scoreboards in NMS.

    Spikes Try something along the lines of to get health to display under names Server#getScoreboardManager().getMainScoreboard().registerNewObjective("Health", Criterias.HEALTH).setDisplaySlot(DisplaySlot.BELOW_NAME);

    As for only showing it for a list of Players, you'll probably have to create your own dummy objective and manually handle the creation of Scores for players. I'm not sure how exactly do this simply by browsing through the documentation, so you'll have to find someone else to help you out with that. If you want Players to only see the health of specific other players you're going to need to create a Scoreboard for those groups of Players and set them to use it.
Thread Status:
Not open for further replies.

Share This Page