public enum ChatColor extends Enum<ChatColor>
| Enum Constant and Description | 
|---|
| AQUARepresents aqua | 
| BLACKRepresents black | 
| BLUERepresents blue | 
| BOLDMakes the text bold. | 
| DARK_AQUARepresents dark blue (aqua) | 
| DARK_BLUERepresents dark blue | 
| DARK_GRAYRepresents dark gray | 
| DARK_GREENRepresents dark green | 
| DARK_PURPLERepresents dark purple | 
| DARK_REDRepresents dark red | 
| GOLDRepresents gold | 
| GRAYRepresents gray | 
| GREENRepresents green | 
| ITALICMakes the text italic. | 
| LIGHT_PURPLERepresents light purple | 
| MAGICRepresents magical characters that change around randomly | 
| REDRepresents red | 
| RESETResets all previous chat colors or formats. | 
| STRIKETHROUGHMakes a line appear through the text. | 
| UNDERLINEMakes the text appear underlined. | 
| WHITERepresents white | 
| YELLOWRepresents yellow | 
| Modifier and Type | Field and Description | 
|---|---|
| static char | COLOR_CHARThe special character which prefixes all chat colour codes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static ChatColor | getByChar(char code)Gets the color represented by the specified color code | 
| static ChatColor | getByChar(String code)Gets the color represented by the specified color code | 
| char | getChar()Gets the char value associated with this color | 
| static String | getLastColors(String input)Gets the ChatColors used at the end of the given input string. | 
| boolean | isColor()Checks if this code is a color code as opposed to a format code. | 
| boolean | isFormat()Checks if this code is a format code as opposed to a color code. | 
| static String | stripColor(String input)Strips the given message of all color codes | 
| String | toString() | 
| static String | translateAlternateColorCodes(char altColorChar,
                            String textToTranslate)Translates a string using an alternate color code character into a
 string that uses the internal ChatColor.COLOR_CODE color code
 character. | 
| static ChatColor | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static ChatColor[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final ChatColor BLACK
public static final ChatColor DARK_BLUE
public static final ChatColor DARK_GREEN
public static final ChatColor DARK_AQUA
public static final ChatColor DARK_RED
public static final ChatColor DARK_PURPLE
public static final ChatColor GOLD
public static final ChatColor GRAY
public static final ChatColor DARK_GRAY
public static final ChatColor BLUE
public static final ChatColor GREEN
public static final ChatColor AQUA
public static final ChatColor RED
public static final ChatColor LIGHT_PURPLE
public static final ChatColor YELLOW
public static final ChatColor WHITE
public static final ChatColor MAGIC
public static final ChatColor BOLD
public static final ChatColor STRIKETHROUGH
public static final ChatColor UNDERLINE
public static final ChatColor ITALIC
public static final ChatColor RESET
public static final char COLOR_CHAR
public static ChatColor[] values()
for (ChatColor c : ChatColor.values()) System.out.println(c);
public static ChatColor valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic char getChar()
public boolean isFormat()
public boolean isColor()
public static ChatColor getByChar(char code)
code - Code to checkChatColor with the given code,
     or null if it doesn't existpublic static ChatColor getByChar(String code)
code - Code to checkChatColor with the given code,
     or null if it doesn't existpublic static String stripColor(String input)
input - String to strip of colorpublic static String translateAlternateColorCodes(char altColorChar, String textToTranslate)
altColorChar - The alternate color code character to replace. Ex: &textToTranslate - Text containing the alternate color code character.Copyright © 2015. All rights reserved.