Package net.minecraft.world.scores
Class Scoreboard
java.lang.Object
net.minecraft.world.scores.Scoreboard
- Direct Known Subclasses:
ServerScoreboard
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
static int
static int
static int
static int
static int
private Objective[]
private static String[]
static int
private Map<ObjectiveCriteria,List<Objective>>
private Map<String,PlayerTeam>
private Map<String,PlayerTeam>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddObjective(String p_83437_, ObjectiveCriteria p_83438_, Component p_83439_, ObjectiveCriteria.RenderType p_83440_)
addPlayerTeam(String p_83493_)
boolean
addPlayerToTeam(String p_83434_, PlayerTeam p_83435_)
void
entityRemoved(Entity p_83421_)
void
forAllObjectives(ObjectiveCriteria p_83428_, String p_83429_, Consumer<Score> p_83430_)
getDisplayObjective(int p_83417_)
static int
getDisplaySlotByName(String p_83505_)
static String
getDisplaySlotName(int p_83454_)
static String[]
getObjective(String p_83478_)
getOrCreateObjective(String p_83470_)
getOrCreatePlayerScore(String p_83472_, Objective p_83473_)
getPlayerScores(String p_83484_)
getPlayerScores(Objective p_83499_)
getPlayersTeam(String p_83501_)
getPlayerTeam(String p_83490_)
boolean
hasObjective(String p_83460_)
boolean
hasPlayerScore(String p_83462_, Objective p_83463_)
protected void
loadPlayerScores(ListTag p_83446_)
void
onObjectiveAdded(Objective p_83422_)
void
onObjectiveChanged(Objective p_83455_)
void
onObjectiveRemoved(Objective p_83467_)
void
onPlayerRemoved(String p_83431_)
void
onPlayerScoreRemoved(String p_83432_, Objective p_83433_)
void
onScoreChanged(Score p_83424_)
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
resetPlayerScore(String p_83480_, Objective p_83481_)
protected ListTag
void
setDisplayObjective(int p_83418_, Objective p_83419_)
-
Field Details
-
DISPLAY_SLOT_LIST
public static final int DISPLAY_SLOT_LIST- See Also:
- Constant Field Values
-
DISPLAY_SLOT_SIDEBAR
public static final int DISPLAY_SLOT_SIDEBAR- See Also:
- Constant Field Values
-
DISPLAY_SLOT_BELOW_NAME
public static final int DISPLAY_SLOT_BELOW_NAME- See Also:
- Constant Field Values
-
DISPLAY_SLOT_TEAMS_SIDEBAR_START
public static final int DISPLAY_SLOT_TEAMS_SIDEBAR_START- See Also:
- Constant Field Values
-
DISPLAY_SLOT_TEAMS_SIDEBAR_END
public static final int DISPLAY_SLOT_TEAMS_SIDEBAR_END- See Also:
- Constant Field Values
-
DISPLAY_SLOTS
public static final int DISPLAY_SLOTS- See Also:
- Constant Field Values
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH- See Also:
- Constant Field Values
-
objectivesByName
-
objectivesByCriteria
-
playerScores
-
displayObjectives
-
teamsByName
-
teamsByPlayer
-
displaySlotNames
-
-
Constructor Details
-
Scoreboard
public Scoreboard()
-
-
Method Details
-
hasObjective
-
getOrCreateObjective
-
getObjective
-
addObjective
public Objective addObjective(String p_83437_, ObjectiveCriteria p_83438_, Component p_83439_, ObjectiveCriteria.RenderType p_83440_) -
forAllObjectives
public final void forAllObjectives(ObjectiveCriteria p_83428_, String p_83429_, Consumer<Score> p_83430_) -
hasPlayerScore
-
getOrCreatePlayerScore
-
getPlayerScores
-
getObjectives
-
getObjectiveNames
-
getTrackedPlayers
-
resetPlayerScore
-
getPlayerScores
-
removeObjective
-
setDisplayObjective
-
getDisplayObjective
-
getPlayerTeam
-
addPlayerTeam
-
removePlayerTeam
-
addPlayerToTeam
-
removePlayerFromTeam
-
removePlayerFromTeam
-
getTeamNames
-
getPlayerTeams
-
getPlayersTeam
-
onObjectiveAdded
-
onObjectiveChanged
-
onObjectiveRemoved
-
onScoreChanged
-
onPlayerRemoved
-
onPlayerScoreRemoved
-
onTeamAdded
-
onTeamChanged
-
onTeamRemoved
-
getDisplaySlotName
-
getDisplaySlotByName
-
getDisplaySlotNames
-
entityRemoved
-
savePlayerScores
-
loadPlayerScores
-