Package net.minecraft.scoreboard
Class Scoreboard
- java.lang.Object
-
- net.minecraft.scoreboard.Scoreboard
-
- Direct Known Subclasses:
ServerScoreboard
public class Scoreboard extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ScoreObjective[]
displayObjectives
private static java.lang.String[]
displaySlotNames
private java.util.Map<ScoreCriteria,java.util.List<ScoreObjective>>
objectivesByCriteria
private java.util.Map<java.lang.String,ScoreObjective>
objectivesByName
private java.util.Map<java.lang.String,java.util.Map<ScoreObjective,Score>>
playerScores
private java.util.Map<java.lang.String,ScorePlayerTeam>
teamsByName
private java.util.Map<java.lang.String,ScorePlayerTeam>
teamsByPlayer
-
Constructor Summary
Constructors Constructor Description Scoreboard()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ScoreObjective
addObjective(java.lang.String p_199868_1_, ScoreCriteria p_199868_2_, ITextComponent p_199868_3_, ScoreCriteria.RenderType p_199868_4_)
ScorePlayerTeam
addPlayerTeam(java.lang.String p_96527_1_)
boolean
addPlayerToTeam(java.lang.String p_197901_1_, ScorePlayerTeam p_197901_2_)
void
entityRemoved(Entity p_181140_1_)
void
forAllObjectives(ScoreCriteria p_197893_1_, java.lang.String p_197893_2_, java.util.function.Consumer<Score> p_197893_3_)
ScoreObjective
getDisplayObjective(int p_96539_1_)
static int
getDisplaySlotByName(java.lang.String p_96537_0_)
static java.lang.String
getDisplaySlotName(int p_96517_0_)
static java.lang.String[]
getDisplaySlotNames()
ScoreObjective
getObjective(java.lang.String p_96518_1_)
java.util.Collection<java.lang.String>
getObjectiveNames()
java.util.Collection<ScoreObjective>
getObjectives()
ScoreObjective
getOrCreateObjective(java.lang.String p_197899_1_)
Score
getOrCreatePlayerScore(java.lang.String p_96529_1_, ScoreObjective p_96529_2_)
java.util.Map<ScoreObjective,Score>
getPlayerScores(java.lang.String p_96510_1_)
java.util.Collection<Score>
getPlayerScores(ScoreObjective p_96534_1_)
ScorePlayerTeam
getPlayersTeam(java.lang.String p_96509_1_)
ScorePlayerTeam
getPlayerTeam(java.lang.String p_96508_1_)
java.util.Collection<ScorePlayerTeam>
getPlayerTeams()
java.util.Collection<java.lang.String>
getTeamNames()
java.util.Collection<java.lang.String>
getTrackedPlayers()
boolean
hasObjective(java.lang.String p_197900_1_)
boolean
hasPlayerScore(java.lang.String p_178819_1_, ScoreObjective p_178819_2_)
protected void
loadPlayerScores(ListNBT p_197905_1_)
void
onObjectiveAdded(ScoreObjective p_96522_1_)
void
onObjectiveChanged(ScoreObjective p_199869_1_)
void
onObjectiveRemoved(ScoreObjective p_96533_1_)
void
onPlayerRemoved(java.lang.String p_96516_1_)
void
onPlayerScoreRemoved(java.lang.String p_178820_1_, ScoreObjective p_178820_2_)
void
onScoreChanged(Score p_96536_1_)
void
onTeamAdded(ScorePlayerTeam p_96523_1_)
void
onTeamChanged(ScorePlayerTeam p_96538_1_)
void
onTeamRemoved(ScorePlayerTeam p_96513_1_)
void
removeObjective(ScoreObjective p_96519_1_)
boolean
removePlayerFromTeam(java.lang.String p_96524_1_)
void
removePlayerFromTeam(java.lang.String p_96512_1_, ScorePlayerTeam p_96512_2_)
void
removePlayerTeam(ScorePlayerTeam p_96511_1_)
void
resetPlayerScore(java.lang.String p_178822_1_, ScoreObjective p_178822_2_)
protected ListNBT
savePlayerScores()
void
setDisplayObjective(int p_96530_1_, ScoreObjective p_96530_2_)
-
-
-
Field Detail
-
objectivesByName
private final java.util.Map<java.lang.String,ScoreObjective> objectivesByName
-
objectivesByCriteria
private final java.util.Map<ScoreCriteria,java.util.List<ScoreObjective>> objectivesByCriteria
-
playerScores
private final java.util.Map<java.lang.String,java.util.Map<ScoreObjective,Score>> playerScores
-
displayObjectives
private final ScoreObjective[] displayObjectives
-
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
-
-
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_)
-
addObjective
public ScoreObjective addObjective(java.lang.String p_199868_1_, ScoreCriteria p_199868_2_, ITextComponent p_199868_3_, ScoreCriteria.RenderType p_199868_4_)
-
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_)
-
onTeamAdded
public void onTeamAdded(ScorePlayerTeam p_96523_1_)
-
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_)
-
-