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_311367_, NumberFormat p_311959_) 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_310719_, Consumer<ScoreAccess> p_83430_) getDisplayObjective
(DisplaySlot p_297931_) getObjective
(String p_83478_) private PlayerScores
getOrCreatePlayerInfo
(String p_311117_) getOrCreatePlayerScore
(ScoreHolder p_309688_, Objective p_83473_) getOrCreatePlayerScore
(ScoreHolder p_310827_, Objective p_312875_, boolean p_310024_) getPlayerScoreInfo
(ScoreHolder p_309394_, Objective p_310266_) getPlayersTeam
(String p_83501_) getPlayerTeam
(String p_83490_) listPlayerScores
(Objective p_312530_) it.unimi.dsi.fastutil.objects.Object2IntMap<Objective>
listPlayerScores
(ScoreHolder p_312742_) 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_312272_) void
onPlayerScoreRemoved
(ScoreHolder p_311030_, Objective p_83433_) protected void
onScoreChanged
(ScoreHolder p_312923_, Objective p_311972_, Score p_83424_) protected void
onScoreLockChanged
(ScoreHolder p_311114_, Objective p_309936_) 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_311535_) void
resetSinglePlayerScore
(ScoreHolder p_312886_, Objective p_311508_) protected ListTag
void
setDisplayObjective
(DisplaySlot p_297926_, 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_311367_, @Nullable NumberFormat p_311959_) -
forAllObjectives
public final void forAllObjectives(ObjectiveCriteria p_83428_, ScoreHolder p_310719_, Consumer<ScoreAccess> p_83430_) -
getOrCreatePlayerInfo
-
getOrCreatePlayerScore
-
getOrCreatePlayerScore
public ScoreAccess getOrCreatePlayerScore(ScoreHolder p_310827_, Objective p_312875_, boolean p_310024_) -
getPlayerScoreInfo
-
listPlayerScores
-
getObjectives
-
getObjectiveNames
-
getTrackedPlayers
-
resetAllPlayerScores
-
resetSinglePlayerScore
-
listPlayerScores
public it.unimi.dsi.fastutil.objects.Object2IntMap<Objective> listPlayerScores(ScoreHolder p_312742_) -
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
-