Reinstate static color list, clarify intent

This commit is contained in:
riking 2013-10-28 12:47:25 -07:00
parent 3fe936306b
commit f64f62492f

View File

@ -23,6 +23,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
public class ScoreboardManager { public class ScoreboardManager {
static final Map<String, ScoreboardWrapper> PLAYER_SCOREBOARDS = new HashMap<String, ScoreboardWrapper>(); static final Map<String, ScoreboardWrapper> PLAYER_SCOREBOARDS = new HashMap<String, ScoreboardWrapper>();
@ -55,13 +56,21 @@ public class ScoreboardManager {
ImmutableMap.Builder<AbilityType, OfflinePlayer> abilityLabelSkillBuilder = ImmutableMap.builder(); ImmutableMap.Builder<AbilityType, OfflinePlayer> abilityLabelSkillBuilder = ImmutableMap.builder();
if (Config.getInstance().getScoreboardRainbows()) { if (Config.getInstance().getScoreboardRainbows()) {
List<ChatColor> colors = new ArrayList<ChatColor>(); // Everything but black, gray, gold
List<ChatColor> colors = Lists.newArrayList(
for (ChatColor color : ChatColor.values()) { ChatColor.WHITE,
if (color.isColor() && color != ChatColor.BLACK) { ChatColor.YELLOW,
colors.add(color); ChatColor.LIGHT_PURPLE,
} ChatColor.RED,
} ChatColor.AQUA,
ChatColor.GREEN,
ChatColor.DARK_GRAY,
ChatColor.BLUE,
ChatColor.DARK_PURPLE,
ChatColor.DARK_RED,
ChatColor.DARK_AQUA,
ChatColor.DARK_GREEN,
ChatColor.DARK_BLUE);
Collections.shuffle(colors, Misc.getRandom()); Collections.shuffle(colors, Misc.getRandom());