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<IScoreCriteria,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 |
---|---|
boolean |
addPlayerToTeam(java.lang.String player,
java.lang.String newTeam) |
ScoreObjective |
addScoreObjective(java.lang.String name,
IScoreCriteria criteria) |
void |
broadcastScoreUpdate(java.lang.String scoreName) |
void |
broadcastScoreUpdate(java.lang.String scoreName,
ScoreObjective objective) |
void |
broadcastTeamCreated(ScorePlayerTeam playerTeam) |
void |
broadcastTeamInfoUpdate(ScorePlayerTeam playerTeam) |
void |
broadcastTeamRemove(ScorePlayerTeam playerTeam) |
ScorePlayerTeam |
createTeam(java.lang.String name) |
boolean |
entityHasObjective(java.lang.String name,
ScoreObjective objective) |
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) |
java.util.Collection<ScoreObjective> |
getObjectivesFromCriteria(IScoreCriteria criteria) |
Score |
getOrCreateScore(java.lang.String username,
ScoreObjective objective) |
ScorePlayerTeam |
getPlayersTeam(java.lang.String username) |
java.util.Collection<ScoreObjective> |
getScoreObjectives() |
java.util.Collection<Score> |
getScores() |
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() |
void |
onObjectiveDisplayNameChanged(ScoreObjective objective) |
void |
onScoreObjectiveAdded(ScoreObjective scoreObjectiveIn) |
void |
onScoreObjectiveRemoved(ScoreObjective objective) |
void |
onScoreUpdated(Score scoreIn) |
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<IScoreCriteria,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
@Nullable public ScoreObjective getObjective(java.lang.String name)
public ScoreObjective addScoreObjective(java.lang.String name, IScoreCriteria criteria)
public java.util.Collection<ScoreObjective> getObjectivesFromCriteria(IScoreCriteria criteria)
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> getObjectiveNames()
public void removeObjectiveFromEntity(java.lang.String name, ScoreObjective objective)
public java.util.Collection<Score> getScores()
public java.util.Map<ScoreObjective,Score> getObjectivesForEntity(java.lang.String name)
public void removeObjective(ScoreObjective objective)
public void setObjectiveInDisplaySlot(int objectiveSlot, 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 player, java.lang.String newTeam)
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 onScoreObjectiveAdded(ScoreObjective scoreObjectiveIn)
public void onObjectiveDisplayNameChanged(ScoreObjective objective)
public void onScoreObjectiveRemoved(ScoreObjective objective)
public void onScoreUpdated(Score scoreIn)
public void broadcastScoreUpdate(java.lang.String scoreName)
public void broadcastScoreUpdate(java.lang.String scoreName, ScoreObjective objective)
public void broadcastTeamCreated(ScorePlayerTeam playerTeam)
public void broadcastTeamInfoUpdate(ScorePlayerTeam playerTeam)
public void broadcastTeamRemove(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)