public class ServerScoreboard extends Scoreboard
Modifier and Type | Class and Description |
---|---|
static class |
ServerScoreboard.UpdateMode |
Modifier and Type | Field and Description |
---|---|
private Set<ScoreboardObjective> |
objectives |
private MinecraftServer |
server |
private Runnable[] |
updateListeners |
Constructor and Description |
---|
ServerScoreboard(MinecraftServer server) |
addObjective, addTeam, clearPlayerTeam, containsObjective, forEachScore, fromTag, getAllPlayerScores, getDisplaySlotId, getDisplaySlotName, getDisplaySlotNames, getKnownPlayers, getNullableObjective, getObjective, getObjectiveForSlot, getObjectiveNames, getObjectives, getPlayerObjectives, getPlayerScore, getPlayerTeam, getTeam, getTeamNames, getTeams, playerHasObjective, removeObjective, removeTeam, resetEntityScore, resetPlayerScore, toTag
private final MinecraftServer server
private final Set<ScoreboardObjective> objectives
private Runnable[] updateListeners
public ServerScoreboard(MinecraftServer server)
public void updateScore(ScoreboardPlayerScore score)
updateScore
in class Scoreboard
public void updatePlayerScore(String playerName)
updatePlayerScore
in class Scoreboard
public void updatePlayerScore(String playerName, ScoreboardObjective objective)
updatePlayerScore
in class Scoreboard
public void setObjectiveSlot(int slot, @Nullable ScoreboardObjective objective)
setObjectiveSlot
in class Scoreboard
public boolean addPlayerToTeam(String playerName, Team team)
addPlayerToTeam
in class Scoreboard
public void removePlayerFromTeam(String playerName, Team team)
removePlayerFromTeam
in class Scoreboard
public void updateObjective(ScoreboardObjective objective)
updateObjective
in class Scoreboard
public void updateExistingObjective(ScoreboardObjective objective)
updateExistingObjective
in class Scoreboard
public void updateRemovedObjective(ScoreboardObjective objective)
updateRemovedObjective
in class Scoreboard
public void updateScoreboardTeamAndPlayers(Team team)
updateScoreboardTeamAndPlayers
in class Scoreboard
public void updateScoreboardTeam(Team team)
updateScoreboardTeam
in class Scoreboard
public void updateRemovedTeam(Team team)
updateRemovedTeam
in class Scoreboard
public void addUpdateListener(Runnable listener)
protected void runUpdateListeners()
public List<Packet<?>> createChangePackets(ScoreboardObjective objective)
public void addScoreboardObjective(ScoreboardObjective objective)
public List<Packet<?>> createRemovePackets(ScoreboardObjective objective)
public void removeScoreboardObjective(ScoreboardObjective objective)
public int getSlot(ScoreboardObjective objective)