Fix player list spacing issue

This commit is contained in:
Connor Monahan 2014-01-07 18:30:03 -06:00
parent b011d3a46f
commit 20068cbb15
2 changed files with 5 additions and 5 deletions

View File

@ -736,10 +736,10 @@ public class Team {
* *
* @return array of usernames. * @return array of usernames.
*/ */
public String[] getPlayerNames() { public List<String> getPlayerNames() {
String[] ret = new String[this.players.size()]; List<String> ret = new ArrayList<String>(this.players.size());
for (int i = 0; i < this.players.size(); i++) { for (Player player : this.players) {
ret[i] = this.players.get(i).getName(); ret.add(player.getName());
} }
return ret; return ret;
} }

View File

@ -206,7 +206,7 @@ public class Warzone {
teamsMessage.append('\n'); teamsMessage.append('\n');
teamsMessage.append(MessageFormat.format(War.war.getString("zone.teaminfo.format"), teamsMessage.append(MessageFormat.format(War.war.getString("zone.teaminfo.format"),
team.getName(), team.getPoints(), team.getRemainingLifes(), team.getName(), team.getPoints(), team.getRemainingLifes(),
team.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL), StringUtils.join(team.getPlayerNames()))); team.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL), StringUtils.join(team.getPlayerNames().iterator(), ", ")));
} }
} }
return teamsMessage.toString(); return teamsMessage.toString();