171172173174175176177178
* @param name to add * @return this team */ public Team addPlayerName(String name) { playerNames.add(name); scoreboard.callProtocolEvent(new TeamActionEvent(this, ScoreboardTeamMessage.ADD_PLAYERS, name)); return this; }
183184185186187188189190
* @param name to add * @return this team */ public Team removePlayerName(String name) { playerNames.remove(name); scoreboard.callProtocolEvent(new TeamActionEvent(this, ScoreboardTeamMessage.REMOVE_PLAYERS, name)); return this; }
188189190191192193194
scoreboard.callProtocolEvent(new TeamActionEvent(this, ScoreboardTeamMessage.REMOVE_PLAYERS, name)); return this; } private void update() { scoreboard.callProtocolEvent(new TeamActionEvent(this, ScoreboardTeamMessage.ACTION_UPDATE)); }
104105106107108109110111
* @return newly created team */ public Team createTeam(String name) { Team team = new Team(this, name); teams.add(team); callProtocolEvent(new TeamActionEvent(team, ScoreboardTeamMessage.ACTION_CREATE)); return team; }
119120121122123124125
Team team = getTeam(name); if (team == null) { throw new IllegalArgumentException("Specified team does not exist on this scoreboard."); } teams.remove(team); callProtocolEvent(new TeamActionEvent(team, ScoreboardTeamMessage.ACTION_REMOVE)); }