Package org.bukkit
Enum Class ChatColor
- All Implemented Interfaces:
Serializable
,Comparable<ChatColor>
,Constable
Deprecated.
All supported color values for chat
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum 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 Summary
Modifier and TypeFieldDescriptionstatic final char
Deprecated.The special character which prefixes all chat colour codes. -
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.ChatColor
asBungee()
Deprecated.getByChar
(char code) Deprecated.Gets the color represented by the specified color codeDeprecated.Gets the color represented by the specified color codechar
getChar()
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.boolean
isColor()
Deprecated.Checks if this code is a color code as opposed to a format code.boolean
isFormat()
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 ChatColor
Deprecated.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
-
BLACK
Deprecated.Represents black -
DARK_BLUE
Deprecated.Represents dark blue -
DARK_GREEN
Deprecated.Represents dark green -
DARK_AQUA
Deprecated.Represents dark blue (aqua) -
DARK_RED
Deprecated.Represents dark red -
DARK_PURPLE
Deprecated.Represents dark purple -
GOLD
Deprecated.Represents gold -
GRAY
Deprecated.Represents gray -
DARK_GRAY
Deprecated.Represents dark gray -
BLUE
Deprecated.Represents blue -
GREEN
Deprecated.Represents green -
AQUA
Deprecated.Represents aqua -
RED
Deprecated.Represents red -
LIGHT_PURPLE
Deprecated.Represents light purple -
YELLOW
Deprecated.Represents yellow -
WHITE
Deprecated.Represents white -
MAGIC
Deprecated.Represents magical characters that change around randomly -
BOLD
Deprecated.Makes the text bold. -
STRIKETHROUGH
Deprecated.Makes a line appear through the text. -
UNDERLINE
Deprecated.Makes the text appear underlined. -
ITALIC
Deprecated.Makes the text italic. -
RESET
Deprecated.Resets all previous chat colors or formats.
-
-
Field Details
-
COLOR_CHAR
public 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
-
values
Deprecated.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
-
valueOf
Deprecated.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 nameNullPointerException
- if the argument is null
-
asBungee
Deprecated. -
getChar
public char getChar()Deprecated.Gets the char value associated with this color- Returns:
- A char value of this color code
-
toString
Deprecated. -
isFormat
public 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
-
isColor
public 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
-
getByChar
Deprecated.Gets the color represented by the specified color code- Parameters:
code
- Code to check- Returns:
- Associative
ChatColor
with the given code, or null if it doesn't exist
-
getByChar
Deprecated.Gets the color represented by the specified color code- Parameters:
code
- Code to check- Returns:
- Associative
ChatColor
with 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.
-
getLastColors
Deprecated.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.
-