Package org.geysermc.geyser.scoreboard
Class Scoreboard
java.lang.Object
org.geysermc.geyser.scoreboard.Scoreboard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteObjective(Objective objective, boolean remove) voiddisplayObjective(String objectiveId, org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition displaySlot) getObjective(String objectiveName) Required to preserve vanilla behavior, which also uses a map.getSlot(org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot) getTeamFor(String entity) voidonUpdate()@Nullable ObjectiveregisterNewObjective(String objectiveId) registerNewTeam(String teamName, String[] players) voidvoidremoveTeam(String teamName) voidunregisterObjective(String objectiveName) voidupdateEntityNames(@Nullable Team team, Set<String> names, boolean teamChange) Updates the display name of a set of entities within a given team.voidupdateEntityNames(Team team, boolean teamChange) Updates the display names of all entities in a given team.
-
Constructor Details
-
Scoreboard
-
-
Method Details
-
removeScoreboard
public void removeScoreboard() -
registerNewObjective
-
displayObjective
public void displayObjective(String objectiveId, org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition displaySlot) -
registerNewTeam
-
onUpdate
public void onUpdate() -
deleteObjective
- Parameters:
remove- if we should remove the objective from the objectives map.
-
getObjective
-
getObjectives
-
unregisterObjective
-
getSlot
public Objective getSlot(org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot) -
getTeam
-
getTeamFor
-
removeTeam
-
getTeamNames
-
updateEntityNames
Updates the display names of all entities in a given team.- Parameters:
teamChange- the players have either joined or left the team. Used for optimizations when just the display name updated.
-
updateEntityNames
Updates the display name of a set of entities within a given team. The team may also be null if the set is being removed from a team. -
getNextId
-
getObjectiveSlots
-
getPlayerToTeam
Required to preserve vanilla behavior, which also uses a map. Otherwise, for example, if TAB has a team for a player and vanilla has a team, "race conditions" that do not match vanilla could occur.
-