static { UtilsChatFormatting[] var0 = values(); int var1 = var0.length; for (int var2 = 0; var2 < var1; ++var2) { UtilsChatFormatting var3 = var0[var2]; formattingCodeMapping.put(Character.valueOf(var3.getFormattingCode()), var3); nameMapping.put(var3.getFriendlyName(), var3); } }
/** * Gets all the valid values. Args: @param par0: Whether or not to include color values. @param * par1: Whether or not to include fancy-styling values (anything that isn't a color value or the * "reset" value). */ public static Collection<String> getValidValues(boolean p_96296_0_, boolean p_96296_1_) { ArrayList<String> arraylist = new ArrayList<String>(); UtilsChatFormatting[] aenumchatformatting = values(); int i = aenumchatformatting.length; for (int j = 0; j < i; ++j) { UtilsChatFormatting enumchatformatting = aenumchatformatting[j]; if ((!enumchatformatting.isColor() || p_96296_0_) && (!enumchatformatting.isFancyStyling() || p_96296_1_)) { arraylist.add(enumchatformatting.getFriendlyName()); } } return arraylist; }