Package net.minecraft.scoreboard
Class Scoreboard
- java.lang.Object
-
- net.minecraft.scoreboard.Scoreboard
-
public class Scoreboard extends java.lang.Object
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Constructor Summary
Constructors Constructor Description Scoreboard()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addPlayerToTeam(java.lang.String player, java.lang.String newTeam)
+ Adds a player to the given teamScoreObjective
addScoreObjective(java.lang.String name, IScoreObjectiveCriteria criteria)
+ Create and returns the score objective for the given name and ScoreCriteriavoid
broadcastTeamCreated(ScorePlayerTeam playerTeam)
+ This packet will notify the players that this team is created, and that will register it on the clientScorePlayerTeam
createTeam(java.lang.String parString1)
boolean
entityHasObjective(java.lang.String name, ScoreObjective parScoreObjective)
+ Returns if the entity has the given ScoreObjectivevoid
func_178820_a(java.lang.String parString1, ScoreObjective parScoreObjective)
void
func_181140_a(Entity parEntity)
void
func_96513_c(ScorePlayerTeam playerTeam)
void
func_96516_a(java.lang.String parString1)
void
func_96532_b(ScoreObjective parScoreObjective)
void
func_96533_c(ScoreObjective parScoreObjective)
void
func_96536_a(Score parScore)
static java.lang.String[]
getDisplaySlotStrings()
ScoreObjective
getObjective(java.lang.String name)
+ Returns a ScoreObjective for the objective namestatic java.lang.String
getObjectiveDisplaySlot(int parInt1)
+ Returns 'list' for 0, 'sidebar' for 1, 'belowName for 2, otherwise null.static int
getObjectiveDisplaySlotNumber(java.lang.String parString1)
+ Returns 0 for (case-insensitive) 'list', 1 for 'sidebar', 2 for 'belowName', otherwise -1.ScoreObjective
getObjectiveInDisplaySlot(int parInt1)
+ 0 is tab menu, 1 is sidebar, 2 is below namejava.util.Collection<java.lang.String>
getObjectiveNames()
java.util.Map<ScoreObjective,Score>
getObjectivesForEntity(java.lang.String name)
java.util.Collection<ScoreObjective>
getObjectivesFromCriteria(IScoreObjectiveCriteria criteria)
+ Returns all the objectives for the given criteriaScorePlayerTeam
getPlayersTeam(java.lang.String parString1)
+ Gets the ScorePlayerTeam object for the given username.java.util.Collection<ScoreObjective>
getScoreObjectives()
java.util.Collection<Score>
getScores()
java.util.Collection<Score>
getSortedScores(ScoreObjective objective)
+ Returns an array of Score objects, sorting by Score.getScorePoints()ScorePlayerTeam
getTeam(java.lang.String parString1)
+ Retrieve the ScorePlayerTeam instance identified by the passed team namejava.util.Collection<java.lang.String>
getTeamNames()
+ Retrieve all registered ScorePlayerTeam namesjava.util.Collection<ScorePlayerTeam>
getTeams()
+ Retrieve all registered ScorePlayerTeam instancesScore
getValueFromObjective(java.lang.String name, ScoreObjective objective)
+ Returns the value of the given objective for the given entity namevoid
onScoreObjectiveAdded(ScoreObjective scoreObjectiveIn)
+ Called when a score objective is addedvoid
removeObjective(ScoreObjective parScoreObjective)
void
removeObjectiveFromEntity(java.lang.String name, ScoreObjective objective)
+ Remove the given ScoreObjective for the given Entity name.void
removePlayerFromTeam(java.lang.String parString1, ScorePlayerTeam parScorePlayerTeam)
+ Removes the given username from the given ScorePlayerTeam.boolean
removePlayerFromTeams(java.lang.String parString1)
void
removeTeam(ScorePlayerTeam parScorePlayerTeam)
+ Removes the team from the scoreboard, updates all player memberships and broadcasts the deletion to all playersvoid
sendTeamUpdate(ScorePlayerTeam playerTeam)
+ This packet will notify the players that this team is updatedvoid
setObjectiveInDisplaySlot(int parInt1, ScoreObjective parScoreObjective)
+ 0 is tab menu, 1 is sidebar, 2 is below name
-
-
-
Method Detail
-
getObjective
public ScoreObjective getObjective(java.lang.String name)
+ Returns a ScoreObjective for the objective name
-
addScoreObjective
public ScoreObjective addScoreObjective(java.lang.String name, IScoreObjectiveCriteria criteria)
+ Create and returns the score objective for the given name and ScoreCriteria
-
getObjectivesFromCriteria
public java.util.Collection<ScoreObjective> getObjectivesFromCriteria(IScoreObjectiveCriteria criteria)
+ Returns all the objectives for the given criteria
-
entityHasObjective
public boolean entityHasObjective(java.lang.String name, ScoreObjective parScoreObjective)
+ Returns if the entity has the given ScoreObjective
-
getValueFromObjective
public Score getValueFromObjective(java.lang.String name, ScoreObjective objective)
+ Returns the value of the given objective for the given entity name
-
getSortedScores
public java.util.Collection<Score> getSortedScores(ScoreObjective objective)
+ Returns an array of Score objects, sorting by Score.getScorePoints()
-
getScoreObjectives
public java.util.Collection<ScoreObjective> getScoreObjectives()
-
getObjectiveNames
public java.util.Collection<java.lang.String> getObjectiveNames()
-
removeObjectiveFromEntity
public void removeObjectiveFromEntity(java.lang.String name, ScoreObjective objective)
+ Remove the given ScoreObjective for the given Entity name.
-
getScores
public java.util.Collection<Score> getScores()
-
getObjectivesForEntity
public java.util.Map<ScoreObjective,Score> getObjectivesForEntity(java.lang.String name)
-
removeObjective
public void removeObjective(ScoreObjective parScoreObjective)
-
setObjectiveInDisplaySlot
public void setObjectiveInDisplaySlot(int parInt1, ScoreObjective parScoreObjective)
+ 0 is tab menu, 1 is sidebar, 2 is below name
-
getObjectiveInDisplaySlot
public ScoreObjective getObjectiveInDisplaySlot(int parInt1)
+ 0 is tab menu, 1 is sidebar, 2 is below name
-
getTeam
public ScorePlayerTeam getTeam(java.lang.String parString1)
+ Retrieve the ScorePlayerTeam instance identified by the passed team name
-
createTeam
public ScorePlayerTeam createTeam(java.lang.String parString1)
-
removeTeam
public void removeTeam(ScorePlayerTeam parScorePlayerTeam)
+ Removes the team from the scoreboard, updates all player memberships and broadcasts the deletion to all players
-
addPlayerToTeam
public boolean addPlayerToTeam(java.lang.String player, java.lang.String newTeam)
+ Adds a player to the given team
-
removePlayerFromTeams
public boolean removePlayerFromTeams(java.lang.String parString1)
-
removePlayerFromTeam
public void removePlayerFromTeam(java.lang.String parString1, ScorePlayerTeam parScorePlayerTeam)
+ Removes the given username from the given ScorePlayerTeam. If the player is not on the team then an IllegalStateException is thrown.
-
getTeamNames
public java.util.Collection<java.lang.String> getTeamNames()
+ Retrieve all registered ScorePlayerTeam names
-
getTeams
public java.util.Collection<ScorePlayerTeam> getTeams()
+ Retrieve all registered ScorePlayerTeam instances
-
getPlayersTeam
public ScorePlayerTeam getPlayersTeam(java.lang.String parString1)
+ Gets the ScorePlayerTeam object for the given username.
-
onScoreObjectiveAdded
public void onScoreObjectiveAdded(ScoreObjective scoreObjectiveIn)
+ Called when a score objective is added
-
func_96532_b
public void func_96532_b(ScoreObjective parScoreObjective)
-
func_96533_c
public void func_96533_c(ScoreObjective parScoreObjective)
-
func_96536_a
public void func_96536_a(Score parScore)
-
func_96516_a
public void func_96516_a(java.lang.String parString1)
-
func_178820_a
public void func_178820_a(java.lang.String parString1, ScoreObjective parScoreObjective)
-
broadcastTeamCreated
public void broadcastTeamCreated(ScorePlayerTeam playerTeam)
+ This packet will notify the players that this team is created, and that will register it on the client
-
sendTeamUpdate
public void sendTeamUpdate(ScorePlayerTeam playerTeam)
+ This packet will notify the players that this team is updated
-
func_96513_c
public void func_96513_c(ScorePlayerTeam playerTeam)
-
getObjectiveDisplaySlot
public static java.lang.String getObjectiveDisplaySlot(int parInt1)
+ Returns 'list' for 0, 'sidebar' for 1, 'belowName for 2, otherwise null.
-
getObjectiveDisplaySlotNumber
public static int getObjectiveDisplaySlotNumber(java.lang.String parString1)
+ Returns 0 for (case-insensitive) 'list', 1 for 'sidebar', 2 for 'belowName', otherwise -1.
-
getDisplaySlotStrings
public static java.lang.String[] getDisplaySlotStrings()
-
func_181140_a
public void func_181140_a(Entity parEntity)
-
-