public class Scoreboard
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
displaySlots |
private java.util.Map<java.lang.String,java.util.Map<ScoreObjective,Score>> |
entitiesScoreObjectives |
private ScoreObjective[] |
objectiveDisplaySlots |
private java.util.Map<ScoreCriteria,java.util.List<ScoreObjective>> |
scoreObjectiveCriterias |
private java.util.Map<java.lang.String,ScoreObjective> |
scoreObjectives |
private java.util.Map<java.lang.String,ScorePlayerTeam> |
teamMemberships |
private java.util.Map<java.lang.String,ScorePlayerTeam> |
teams |
Constructor and Description |
---|
Scoreboard() |
Modifier and Type | Method and Description |
---|---|
ScoreObjective |
addObjective(java.lang.String p_199868_1_,
ScoreCriteria p_199868_2_,
ITextComponent p_199868_3_,
ScoreCriteria.RenderType p_199868_4_) |
boolean |
addPlayerToTeam(java.lang.String p_197901_1_,
ScorePlayerTeam p_197901_2_) |
ScorePlayerTeam |
createTeam(java.lang.String name) |
boolean |
entityHasObjective(java.lang.String name,
ScoreObjective objective) |
void |
forAllObjectives(ScoreCriteria p_197893_1_,
java.lang.String p_197893_2_,
java.util.function.Consumer<Score> p_197893_3_) |
java.util.Collection<java.lang.String> |
func_197897_d() |
protected ListNBT |
func_197902_i() |
protected void |
func_197905_a(ListNBT p_197905_1_) |
static java.lang.String[] |
getDisplaySlotStrings() |
ScoreObjective |
getObjective(java.lang.String name) |
static java.lang.String |
getObjectiveDisplaySlot(int id) |
static int |
getObjectiveDisplaySlotNumber(java.lang.String name) |
ScoreObjective |
getObjectiveInDisplaySlot(int slotIn) |
java.util.Collection<java.lang.String> |
getObjectiveNames() |
java.util.Map<ScoreObjective,Score> |
getObjectivesForEntity(java.lang.String name) |
ScoreObjective |
getOrCreateObjective(java.lang.String p_197899_1_) |
Score |
getOrCreateScore(java.lang.String username,
ScoreObjective objective) |
ScorePlayerTeam |
getPlayersTeam(java.lang.String username) |
java.util.Collection<ScoreObjective> |
getScoreObjectives() |
java.util.Collection<Score> |
getSortedScores(ScoreObjective objective) |
ScorePlayerTeam |
getTeam(java.lang.String teamName) |
java.util.Collection<java.lang.String> |
getTeamNames() |
java.util.Collection<ScorePlayerTeam> |
getTeams() |
boolean |
hasObjective(java.lang.String p_197900_1_) |
void |
onObjectiveAdded(ScoreObjective objective) |
void |
onObjectiveChanged(ScoreObjective objective) |
void |
onObjectiveRemoved(ScoreObjective objective) |
void |
onPlayerRemoved(java.lang.String scoreName) |
void |
onPlayerScoreRemoved(java.lang.String scoreName,
ScoreObjective objective) |
void |
onScoreChanged(Score scoreIn) |
void |
onTeamAdded(ScorePlayerTeam playerTeam) |
void |
onTeamChanged(ScorePlayerTeam playerTeam) |
void |
onTeamRemoved(ScorePlayerTeam playerTeam) |
void |
removeEntity(Entity entityIn) |
void |
removeObjective(ScoreObjective objective) |
void |
removeObjectiveFromEntity(java.lang.String name,
ScoreObjective objective) |
void |
removePlayerFromTeam(java.lang.String username,
ScorePlayerTeam playerTeam) |
boolean |
removePlayerFromTeams(java.lang.String playerName) |
void |
removeTeam(ScorePlayerTeam playerTeam) |
void |
setObjectiveInDisplaySlot(int objectiveSlot,
ScoreObjective objective) |
private final java.util.Map<java.lang.String,ScoreObjective> scoreObjectives
private final java.util.Map<ScoreCriteria,java.util.List<ScoreObjective>> scoreObjectiveCriterias
private final java.util.Map<java.lang.String,java.util.Map<ScoreObjective,Score>> entitiesScoreObjectives
private final ScoreObjective[] objectiveDisplaySlots
private final java.util.Map<java.lang.String,ScorePlayerTeam> teams
private final java.util.Map<java.lang.String,ScorePlayerTeam> teamMemberships
private static java.lang.String[] displaySlots
public boolean hasObjective(java.lang.String p_197900_1_)
public ScoreObjective getOrCreateObjective(java.lang.String p_197899_1_)
@Nullable public ScoreObjective getObjective(@Nullable java.lang.String name)
public ScoreObjective addObjective(java.lang.String p_199868_1_, ScoreCriteria p_199868_2_, ITextComponent p_199868_3_, ScoreCriteria.RenderType p_199868_4_)
public final void forAllObjectives(ScoreCriteria p_197893_1_, java.lang.String p_197893_2_, java.util.function.Consumer<Score> p_197893_3_)
public boolean entityHasObjective(java.lang.String name, ScoreObjective objective)
public Score getOrCreateScore(java.lang.String username, ScoreObjective objective)
public java.util.Collection<Score> getSortedScores(ScoreObjective objective)
public java.util.Collection<ScoreObjective> getScoreObjectives()
public java.util.Collection<java.lang.String> func_197897_d()
public java.util.Collection<java.lang.String> getObjectiveNames()
public void removeObjectiveFromEntity(java.lang.String name, @Nullable ScoreObjective objective)
public java.util.Map<ScoreObjective,Score> getObjectivesForEntity(java.lang.String name)
public void removeObjective(ScoreObjective objective)
public void setObjectiveInDisplaySlot(int objectiveSlot, @Nullable ScoreObjective objective)
@Nullable public ScoreObjective getObjectiveInDisplaySlot(int slotIn)
public ScorePlayerTeam getTeam(java.lang.String teamName)
public ScorePlayerTeam createTeam(java.lang.String name)
public void removeTeam(ScorePlayerTeam playerTeam)
public boolean addPlayerToTeam(java.lang.String p_197901_1_, ScorePlayerTeam p_197901_2_)
public boolean removePlayerFromTeams(java.lang.String playerName)
public void removePlayerFromTeam(java.lang.String username, ScorePlayerTeam playerTeam)
public java.util.Collection<java.lang.String> getTeamNames()
public java.util.Collection<ScorePlayerTeam> getTeams()
@Nullable public ScorePlayerTeam getPlayersTeam(java.lang.String username)
public void onObjectiveAdded(ScoreObjective objective)
public void onObjectiveChanged(ScoreObjective objective)
public void onObjectiveRemoved(ScoreObjective objective)
public void onScoreChanged(Score scoreIn)
public void onPlayerRemoved(java.lang.String scoreName)
public void onPlayerScoreRemoved(java.lang.String scoreName, ScoreObjective objective)
public void onTeamAdded(ScorePlayerTeam playerTeam)
public void onTeamChanged(ScorePlayerTeam playerTeam)
public void onTeamRemoved(ScorePlayerTeam playerTeam)
public static java.lang.String getObjectiveDisplaySlot(int id)
public static int getObjectiveDisplaySlotNumber(java.lang.String name)
public static java.lang.String[] getDisplaySlotStrings()
public void removeEntity(Entity entityIn)
protected ListNBT func_197902_i()
protected void func_197905_a(ListNBT p_197905_1_)