Condense color alternation on generator lists; closes #318

This commit is contained in:
Tim Ekl 2011-12-17 13:32:34 -05:00
parent 48f8e033b6
commit 528b448450

View File

@ -46,13 +46,8 @@ public class GeneratorCommand extends MultiverseCommand {
String loadedGens = "";
boolean altColor = false;
for (String s : generators) {
if (altColor) {
altColor = false;
loadedGens += ChatColor.YELLOW + s + "";
} else {
altColor = true;
loadedGens += ChatColor.WHITE + s + "";
}
loadedGens += (altColor ? ChatColor.YELLOW : ChatColor.WHITE) + s + " ";
altColor = !altColor;
}
if (loadedGens.length() == 0) {
loadedGens = ChatColor.RED + "No Generator Plugins found.";