Package org.bukkit
Enum Class ChatColor
- All Implemented Interfaces:
- Serializable,- Comparable<ChatColor>,- Constable
Deprecated.
All supported color values for chat
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionDeprecated.Represents aquaDeprecated.Represents blackDeprecated.Represents blueDeprecated.Makes the text bold.Deprecated.Represents dark blue (aqua)Deprecated.Represents dark blueDeprecated.Represents dark grayDeprecated.Represents dark greenDeprecated.Represents dark purpleDeprecated.Represents dark redDeprecated.Represents goldDeprecated.Represents grayDeprecated.Represents greenDeprecated.Makes the text italic.Deprecated.Represents light purpleDeprecated.Represents magical characters that change around randomlyDeprecated.Represents redDeprecated.Resets all previous chat colors or formats.Deprecated.Makes a line appear through the text.Deprecated.Makes the text appear underlined.Deprecated.Represents whiteDeprecated.Represents yellow
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final charDeprecated.The special character which prefixes all chat colour codes.
- 
Method SummaryModifier and TypeMethodDescriptionnet.md_5.bungee.api.ChatColorasBungee()Deprecated.getByChar(char code) Deprecated.Gets the color represented by the specified color codeDeprecated.Gets the color represented by the specified color codechargetChar()Deprecated.Gets the char value associated with this colorgetLastColors(@NotNull String input) Deprecated.Gets the ChatColors used at the end of the given input string.booleanisColor()Deprecated.Checks if this code is a color code as opposed to a format code.booleanisFormat()Deprecated.Checks if this code is a format code as opposed to a color code.stripColor(@Nullable String input) Deprecated.Strips the given message of all color codestoString()Deprecated.translateAlternateColorCodes(char altColorChar, @NotNull String textToTranslate) Deprecated.Translates a string using an alternate color code character into a string that uses the internal ChatColor.COLOR_CODE color code character.static ChatColorDeprecated.Returns the enum constant of this class with the specified name.static ChatColor[]values()Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
BLACKDeprecated.Represents black
- 
DARK_BLUEDeprecated.Represents dark blue
- 
DARK_GREENDeprecated.Represents dark green
- 
DARK_AQUADeprecated.Represents dark blue (aqua)
- 
DARK_REDDeprecated.Represents dark red
- 
DARK_PURPLEDeprecated.Represents dark purple
- 
GOLDDeprecated.Represents gold
- 
GRAYDeprecated.Represents gray
- 
DARK_GRAYDeprecated.Represents dark gray
- 
BLUEDeprecated.Represents blue
- 
GREENDeprecated.Represents green
- 
AQUADeprecated.Represents aqua
- 
REDDeprecated.Represents red
- 
LIGHT_PURPLEDeprecated.Represents light purple
- 
YELLOWDeprecated.Represents yellow
- 
WHITEDeprecated.Represents white
- 
MAGICDeprecated.Represents magical characters that change around randomly
- 
BOLDDeprecated.Makes the text bold.
- 
STRIKETHROUGHDeprecated.Makes a line appear through the text.
- 
UNDERLINEDeprecated.Makes the text appear underlined.
- 
ITALICDeprecated.Makes the text italic.
- 
RESETDeprecated.Resets all previous chat colors or formats.
 
- 
- 
Field Details- 
COLOR_CHARpublic static final char COLOR_CHARDeprecated.The special character which prefixes all chat colour codes. Use this if you need to dynamically convert colour codes from your custom format.- See Also:
 
 
- 
- 
Method Details- 
valuesDeprecated.Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfDeprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
asBungeeDeprecated.
- 
getCharpublic char getChar()Deprecated.Gets the char value associated with this color- Returns:
- A char value of this color code
 
- 
toStringDeprecated.
- 
isFormatpublic boolean isFormat()Deprecated.Checks if this code is a format code as opposed to a color code.- Returns:
- whether this ChatColor is a format code
 
- 
isColorpublic boolean isColor()Deprecated.Checks if this code is a color code as opposed to a format code.- Returns:
- whether this ChatColor is a color code
 
- 
getByCharDeprecated.Gets the color represented by the specified color code- Parameters:
- code- Code to check
- Returns:
- Associative ChatColorwith the given code, or null if it doesn't exist
 
- 
getByCharDeprecated.Gets the color represented by the specified color code- Parameters:
- code- Code to check
- Returns:
- Associative ChatColorwith the given code, or null if it doesn't exist
 
- 
stripColor@Contract("!null -> !null; null -> null") @Nullable public static @Nullable String stripColor(@Nullable @Nullable String input) Deprecated.Strips the given message of all color codes- Parameters:
- input- String to strip of color
- Returns:
- A copy of the input string, without any coloring
 
- 
translateAlternateColorCodes@NotNull public static @NotNull String translateAlternateColorCodes(char altColorChar, @NotNull @NotNull String textToTranslate) Deprecated.Translates a string using an alternate color code character into a string that uses the internal ChatColor.COLOR_CODE color code character. The alternate color code character will only be replaced if it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r.- Parameters:
- altColorChar- The alternate color code character to replace. Ex: &
- textToTranslate- Text containing the alternate color code character.
- Returns:
- Text containing the ChatColor.COLOR_CODE color code character.
 
- 
getLastColorsDeprecated.Gets the ChatColors used at the end of the given input string.- Parameters:
- input- Input string to retrieve the colors from.
- Returns:
- Any remaining ChatColors to pass onto the next line.
 
 
- 
NamedTextColorfor the adventure equivalent of pre-defined text colors