Class Scoreboard

java.lang.Object
org.geysermc.geyser.scoreboard.Scoreboard

public final class Scoreboard extends Object
  • Constructor Details

  • Method Details

    • removeScoreboard

      public void removeScoreboard()
    • registerNewObjective

      public @Nullable Objective registerNewObjective(String objectiveId)
    • displayObjective

      public void displayObjective(String objectiveId, org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition displaySlot)
    • registerNewTeam

      public Team registerNewTeam(String teamName, String[] players)
    • onUpdate

      public void onUpdate()
    • deleteObjective

      public void deleteObjective(Objective objective, boolean remove)
      Parameters:
      remove - if we should remove the objective from the objectives map.
    • getObjective

      public Objective getObjective(String objectiveName)
    • getObjectives

      public Collection<Objective> getObjectives()
    • unregisterObjective

      public void unregisterObjective(String objectiveName)
    • getSlot

      public Objective getSlot(org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot)
    • getTeam

      public Team getTeam(String teamName)
    • getTeamFor

      public Team getTeamFor(String entity)
    • removeTeam

      public void removeTeam(String teamName)
    • getTeamNames

      @Contract("-> new") public Map<String,Set<org.cloudburstmc.protocol.bedrock.data.command.CommandEnumConstraint>> getTeamNames()
    • updateEntityNames

      public void updateEntityNames(Team team, boolean teamChange)
      Updates the display names of all entities in a given team.
      Parameters:
      teamChange - the players have either joined or left the team. Used for optimizations when just the display name updated.
    • updateEntityNames

      public void updateEntityNames(@Nullable Team team, Set<String> names, boolean teamChange)
      Updates the display name of a set of entities within a given team. The team may also be null if the set is being removed from a team.
    • getNextId

      public AtomicLong getNextId()
    • getObjectiveSlots

      public Map<org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition,Objective> getObjectiveSlots()
    • getPlayerToTeam

      public Map<String,Team> getPlayerToTeam()
      Required to preserve vanilla behavior, which also uses a map. Otherwise, for example, if TAB has a team for a player and vanilla has a team, "race conditions" that do not match vanilla could occur.