Class Scoreboard

  • Direct Known Subclasses:
    ServerScoreboard

    public class Scoreboard
    extends java.lang.Object
    • Field Detail

      • objectivesByName

        private final java.util.Map<java.lang.String,​ScoreObjective> objectivesByName
      • playerScores

        private final java.util.Map<java.lang.String,​java.util.Map<ScoreObjective,​Score>> playerScores
      • teamsByName

        private final java.util.Map<java.lang.String,​ScorePlayerTeam> teamsByName
      • teamsByPlayer

        private final java.util.Map<java.lang.String,​ScorePlayerTeam> teamsByPlayer
      • displaySlotNames

        private static java.lang.String[] displaySlotNames
    • Constructor Detail

      • Scoreboard

        public Scoreboard()
    • Method Detail

      • hasObjective

        public boolean hasObjective​(java.lang.String p_197900_1_)
      • getOrCreateObjective

        public ScoreObjective getOrCreateObjective​(java.lang.String p_197899_1_)
      • getObjective

        @Nullable
        public ScoreObjective getObjective​(@Nullable
                                           java.lang.String p_96518_1_)
      • forAllObjectives

        public final void forAllObjectives​(ScoreCriteria p_197893_1_,
                                           java.lang.String p_197893_2_,
                                           java.util.function.Consumer<Score> p_197893_3_)
      • hasPlayerScore

        public boolean hasPlayerScore​(java.lang.String p_178819_1_,
                                      ScoreObjective p_178819_2_)
      • getOrCreatePlayerScore

        public Score getOrCreatePlayerScore​(java.lang.String p_96529_1_,
                                            ScoreObjective p_96529_2_)
      • getPlayerScores

        public java.util.Collection<Score> getPlayerScores​(ScoreObjective p_96534_1_)
      • getObjectives

        public java.util.Collection<ScoreObjective> getObjectives()
      • getObjectiveNames

        public java.util.Collection<java.lang.String> getObjectiveNames()
      • getTrackedPlayers

        public java.util.Collection<java.lang.String> getTrackedPlayers()
      • resetPlayerScore

        public void resetPlayerScore​(java.lang.String p_178822_1_,
                                     @Nullable
                                     ScoreObjective p_178822_2_)
      • getPlayerScores

        public java.util.Map<ScoreObjective,​Score> getPlayerScores​(java.lang.String p_96510_1_)
      • removeObjective

        public void removeObjective​(ScoreObjective p_96519_1_)
      • setDisplayObjective

        public void setDisplayObjective​(int p_96530_1_,
                                        @Nullable
                                        ScoreObjective p_96530_2_)
      • getDisplayObjective

        @Nullable
        public ScoreObjective getDisplayObjective​(int p_96539_1_)
      • getPlayerTeam

        public ScorePlayerTeam getPlayerTeam​(java.lang.String p_96508_1_)
      • addPlayerTeam

        public ScorePlayerTeam addPlayerTeam​(java.lang.String p_96527_1_)
      • removePlayerTeam

        public void removePlayerTeam​(ScorePlayerTeam p_96511_1_)
      • addPlayerToTeam

        public boolean addPlayerToTeam​(java.lang.String p_197901_1_,
                                       ScorePlayerTeam p_197901_2_)
      • removePlayerFromTeam

        public boolean removePlayerFromTeam​(java.lang.String p_96524_1_)
      • removePlayerFromTeam

        public void removePlayerFromTeam​(java.lang.String p_96512_1_,
                                         ScorePlayerTeam p_96512_2_)
      • getTeamNames

        public java.util.Collection<java.lang.String> getTeamNames()
      • getPlayerTeams

        public java.util.Collection<ScorePlayerTeam> getPlayerTeams()
      • getPlayersTeam

        @Nullable
        public ScorePlayerTeam getPlayersTeam​(java.lang.String p_96509_1_)
      • onObjectiveAdded

        public void onObjectiveAdded​(ScoreObjective p_96522_1_)
      • onObjectiveChanged

        public void onObjectiveChanged​(ScoreObjective p_199869_1_)
      • onObjectiveRemoved

        public void onObjectiveRemoved​(ScoreObjective p_96533_1_)
      • onScoreChanged

        public void onScoreChanged​(Score p_96536_1_)
      • onPlayerRemoved

        public void onPlayerRemoved​(java.lang.String p_96516_1_)
      • onPlayerScoreRemoved

        public void onPlayerScoreRemoved​(java.lang.String p_178820_1_,
                                         ScoreObjective p_178820_2_)
      • onTeamChanged

        public void onTeamChanged​(ScorePlayerTeam p_96538_1_)
      • onTeamRemoved

        public void onTeamRemoved​(ScorePlayerTeam p_96513_1_)
      • getDisplaySlotName

        public static java.lang.String getDisplaySlotName​(int p_96517_0_)
      • getDisplaySlotByName

        public static int getDisplaySlotByName​(java.lang.String p_96537_0_)
      • getDisplaySlotNames

        public static java.lang.String[] getDisplaySlotNames()
      • entityRemoved

        public void entityRemoved​(Entity p_181140_1_)
      • savePlayerScores

        protected ListNBT savePlayerScores()
      • loadPlayerScores

        protected void loadPlayerScores​(ListNBT p_197905_1_)