Package net.minecraft.world.scores
Class Scoreboard
java.lang.Object
net.minecraft.world.scores.Scoreboard
- Direct Known Subclasses:
ServerScoreboard
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<DisplaySlot,
Objective> static final String
private static final org.slf4j.Logger
private final it.unimi.dsi.fastutil.objects.Reference2ObjectMap<ObjectiveCriteria,
List<Objective>> private final Map<String,
PlayerScores> private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<String,
PlayerTeam> private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<String,
PlayerTeam> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddObjective
(String p_83437_, ObjectiveCriteria p_83438_, Component p_83439_, ObjectiveCriteria.RenderType p_83440_, boolean p_313815_, NumberFormat p_313909_) addPlayerTeam
(String p_83493_) boolean
addPlayerToTeam
(String p_83434_, PlayerTeam p_83435_) void
entityRemoved
(Entity p_83421_) final void
forAllObjectives
(ObjectiveCriteria p_83428_, ScoreHolder p_313805_, Consumer<ScoreAccess> p_83430_) getDisplayObjective
(DisplaySlot p_295165_) getObjective
(String p_83478_) private PlayerScores
getOrCreatePlayerInfo
(String p_313892_) getOrCreatePlayerScore
(ScoreHolder p_313714_, Objective p_313948_) getOrCreatePlayerScore
(ScoreHolder p_313717_, Objective p_83473_, boolean p_313939_) getPlayerScoreInfo
(ScoreHolder p_313711_, Objective p_313813_) getPlayersTeam
(String p_83501_) getPlayerTeam
(String p_83490_) listPlayerScores
(Objective p_313802_) it.unimi.dsi.fastutil.objects.Object2IntMap<Objective>
listPlayerScores
(ScoreHolder p_313893_) protected void
loadPlayerScores
(ListTag p_83446_) void
onObjectiveAdded
(Objective p_83422_) void
onObjectiveChanged
(Objective p_83455_) void
onObjectiveRemoved
(Objective p_83467_) void
onPlayerRemoved
(ScoreHolder p_313917_) void
onPlayerScoreRemoved
(ScoreHolder p_313899_, Objective p_83433_) protected void
onScoreChanged
(ScoreHolder p_313729_, Objective p_313930_, Score p_83424_) protected void
onScoreLockChanged
(ScoreHolder p_313727_, Objective p_313708_) void
onTeamAdded
(PlayerTeam p_83423_) void
onTeamChanged
(PlayerTeam p_83456_) void
onTeamRemoved
(PlayerTeam p_83468_) void
removeObjective
(Objective p_83503_) boolean
removePlayerFromTeam
(String p_83496_) void
removePlayerFromTeam
(String p_83464_, PlayerTeam p_83465_) void
removePlayerTeam
(PlayerTeam p_83476_) void
resetAllPlayerScores
(ScoreHolder p_313823_) void
resetSinglePlayerScore
(ScoreHolder p_313783_, Objective p_313928_) protected ListTag
void
setDisplayObjective
(DisplaySlot p_296205_, Objective p_83419_)
-
Field Details
-
HIDDEN_SCORE_PREFIX
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
objectivesByName
-
objectivesByCriteria
private final it.unimi.dsi.fastutil.objects.Reference2ObjectMap<ObjectiveCriteria,List<Objective>> objectivesByCriteria -
playerScores
-
displayObjectives
-
teamsByName
-
teamsByPlayer
-
-
Constructor Details
-
Scoreboard
public Scoreboard()
-
-
Method Details
-
getObjective
-
addObjective
public Objective addObjective(String p_83437_, ObjectiveCriteria p_83438_, Component p_83439_, ObjectiveCriteria.RenderType p_83440_, boolean p_313815_, @Nullable NumberFormat p_313909_) -
forAllObjectives
public final void forAllObjectives(ObjectiveCriteria p_83428_, ScoreHolder p_313805_, Consumer<ScoreAccess> p_83430_) -
getOrCreatePlayerInfo
-
getOrCreatePlayerScore
-
getOrCreatePlayerScore
public ScoreAccess getOrCreatePlayerScore(ScoreHolder p_313717_, Objective p_83473_, boolean p_313939_) -
getPlayerScoreInfo
-
listPlayerScores
-
getObjectives
-
getObjectiveNames
-
getTrackedPlayers
-
resetAllPlayerScores
-
resetSinglePlayerScore
-
listPlayerScores
public it.unimi.dsi.fastutil.objects.Object2IntMap<Objective> listPlayerScores(ScoreHolder p_313893_) -
removeObjective
-
setDisplayObjective
-
getDisplayObjective
-
getPlayerTeam
-
addPlayerTeam
-
removePlayerTeam
-
addPlayerToTeam
-
removePlayerFromTeam
-
removePlayerFromTeam
-
getTeamNames
-
getPlayerTeams
-
getPlayersTeam
-
onObjectiveAdded
-
onObjectiveChanged
-
onObjectiveRemoved
-
onScoreChanged
-
onScoreLockChanged
-
onPlayerRemoved
-
onPlayerScoreRemoved
-
onTeamAdded
-
onTeamChanged
-
onTeamRemoved
-
entityRemoved
-
savePlayerScores
-
loadPlayerScores
-