Solved Showing scoreboard on an entity

Discussion in 'Spigot Plugin Development' started by stanjg, May 4, 2017.

  1. Hello,

    I'm trying to get a scoreboard under the name of an entity. I can't seem to get it to work.

    I hope some of you guys can help me :)

    Thanks,
    Stan
     
  2. Mind posting your code so we can help you...
     
  3. To be honest I didn't have much, since I do not know where to start.

    This is what I had:
    Code (Text):
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
           
            Team team = board.registerNewTeam(ownerName);
            team.addEntry(entity.getUniqueId().toString());
           
            team.setDisplayName("I'm a villager");
     
  4. What does it do instead?
    (That should, if anything. Set the actual name of the villager to "I'm a villager", not below it.)
    You may also find you'll need to flag it so things like this appear as villagers don't usually have a 'scoreboard' above their head.
     
  5. It does nothing, it's completely wrong, that's why I didn't post it in the first place.
     
  6. You're probably taling about the "DisplaySlot.BELOW_NAME", which can be used to display the health or some kind of info below a player's name, but if i'm not wrong, it can't be used on Entities, if you have seen something like a line below the entity name on a server it's because they're using a hologram.
     
    • Like Like x 1
    • Agree Agree x 1
  7. Ok, thanks I'll use a hologram then :)