Add colors to Who command. Fix not being able to use black

This commit is contained in:
Eric Stokes 2011-06-26 19:58:37 -06:00
parent a62d341d8f
commit 84b726b636
2 changed files with 8 additions and 2 deletions

View File

@ -441,7 +441,7 @@ public class MVWorld {
private ChatColor translateStringToChatColor(String color) {
if (color.equalsIgnoreCase("aqua"))
return ChatColor.AQUA;
if (color.equalsIgnoreCase("aqua"))
if (color.equalsIgnoreCase("black"))
return ChatColor.BLACK;
if (color.equalsIgnoreCase("blue"))
return ChatColor.BLUE;

View File

@ -77,7 +77,13 @@ public class WhoCommand extends BaseCommand {
result += player.getName() + " ";
}
}
sender.sendMessage(color + world.getName() + ChatColor.WHITE + " - " + result);
String worldName = world.getName();
if(world.getAlias() != null && world.getAlias().length() > 0) {
worldName = world.getAlias();
color = world.getAliasColor();
}
sender.sendMessage(color + worldName + ChatColor.WHITE + " - " + result);
}
return;
}