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

Handling scoreboard objectives separate from each other and teams

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    •  

      Scoreboard API changes

      I regretted creating this issue for a few years now, but I decided to create it for the archive. This change has a huge positive impact on the way scoreboards work but requires so much API changes that I can understand why it will never be added.

       

      The problem

      In Spigot/Bukkit there is a new "container" for scoreboards that does not really exist in the client side. This container being the "CraftScoreboard". For clients you only have objectives that are shown in a display slot and teams that are completely separate from them.

      In NMS this container is present as well, since there is only one "main" scoreboard. And while the API allows you to create separate containers that each contain objectives, they override the "set of players" it applies to.

      This has huge compatibility issues with plugins wishing to create scoreboards with their own set of players the scoreboard applies to. For example: If I want to create 1 scoreboard with all players having teams it is very easy. But if another plugins wants to create separate scoreboards each being unique per player, it breaks the teams.

      While this seems like a compatibility issue (what it is) it is something that isn't or shouldn't be a problem clientside, seeing objectives and teams are completely handled seperately.

      Proposed change

      A way for teams and objectives to be registered with their own set of "entries". That way, when changes occur, those changes are send to the respective entries only.

      Proposed compatibility

      In order to keep it compatible I think the best way should be to register the teams and objectives inside the CraftScoreboardManager and keeping the current "CraftScoreboard" container and it's functions. The objectives and teams should have ways to add entries to them. When the objective/team is not created "globally" but inside the container it will add the entries to the scoreboard instead

            Unassigned Unassigned
            Maximvdw Maxim Van de Wynckel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: