public class Scoreboard
extends java.lang.Object
コンストラクタと説明 |
---|
Scoreboard() |
修飾子とタイプ | メソッドと説明 |
---|---|
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)
Returns if the entity has the given ScoreObjective
|
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)
Returns a ScoreObjective for the objective name
|
static java.lang.String |
getObjectiveDisplaySlot(int id)
Returns 'list' for 0, 'sidebar' for 1, 'belowName for 2, otherwise null.
|
static int |
getObjectiveDisplaySlotNumber(java.lang.String name)
Returns 0 for (case-insensitive) 'list', 1 for 'sidebar', 2 for 'belowName', otherwise -1.
|
ScoreObjective |
getObjectiveInDisplaySlot(int slotIn)
0 is tab menu, 1 is sidebar, 2 is below name
|
java.util.Collection<java.lang.String> |
getObjectiveNames() |
java.util.Map<ScoreObjective,Score> |
getObjectivesForEntity(java.lang.String name)
Returns all the objectives for the given entity
|
ScoreObjective |
getOrCreateObjective(java.lang.String p_197899_1_) |
Score |
getOrCreateScore(java.lang.String username,
ScoreObjective objective)
Get a player's score or create it if it does not exist
|
ScorePlayerTeam |
getPlayersTeam(java.lang.String username)
Gets the ScorePlayerTeam object for the given username.
|
java.util.Collection<ScoreObjective> |
getScoreObjectives() |
java.util.Collection<Score> |
getSortedScores(ScoreObjective objective)
Returns an array of Score objects, sorting by Score.getScorePoints()
|
ScorePlayerTeam |
getTeam(java.lang.String teamName)
Retrieve the ScorePlayerTeam instance identified by the passed team name
|
java.util.Collection<java.lang.String> |
getTeamNames()
Retrieve all registered ScorePlayerTeam names
|
java.util.Collection<ScorePlayerTeam> |
getTeams()
Retrieve all registered ScorePlayerTeam instances
|
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)
Remove the given ScoreObjective for the given Entity name.
|
void |
removePlayerFromTeam(java.lang.String username,
ScorePlayerTeam playerTeam)
Removes the given username from the given ScorePlayerTeam.
|
boolean |
removePlayerFromTeams(java.lang.String playerName) |
void |
removeTeam(ScorePlayerTeam playerTeam)
Removes the team from the scoreboard, updates all player memberships and broadcasts the deletion to all players
|
void |
setObjectiveInDisplaySlot(int objectiveSlot,
ScoreObjective objective)
0 is tab menu, 1 is sidebar, 2 is below name
|
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_)