Add Mob to Scoreboard Team?

Discussion in 'Spigot Plugin Development' started by xNaxdy, Apr 19, 2017.

  1. Hey, I've recently picked up plugin development again (I'm one of the people who worked last with Craftbukkit when it was still a thing), and noticed that one of the 'new' methods is .addEntry(String) for scoreboard teams.

    The javadoc reads that things which aren't players can also be added to teams. Does that mean it's possible to add mobs to scoreboard teams? If so:
    • Are those mobs restricted by the scoreboard rules? (e.g. no friendly fire)
    • Do those mobs target accordingly? (e.g. only target enemy team players & mobs)
    And finally: How would you implement adding a mob? .addEntry(player.getName()) is fairly intuitive, but how would one go about adding a mob?

    Thank you for your help!
  2. Yop ! I don't have an answer for you, but i would add some mobs in teams too. Have you found something ?
  3. Unfortunately no. I have come up with a workaround though, where I put references to the mobs themselves in extra lists, that "simulate" the teams. Ugly, but works.