Package net.md_5.bungee.api
Class ChatColor
java.lang.Object
net.md_5.bungee.api.ChatColor
Simplistic enumeration of all supported color values for chat.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final ChatColor
Represents aqua.static final ChatColor
Represents black.static final ChatColor
Represents blue.static final ChatColor
Makes the text bold.static final char
The special character which prefixes all chat colour codes.static final ChatColor
Represents dark blue (aqua).static final ChatColor
Represents dark blue.static final ChatColor
Represents dark gray.static final ChatColor
Represents dark green.static final ChatColor
Represents dark purple.static final ChatColor
Represents dark red.static final ChatColor
Represents gold.static final ChatColor
Represents gray.static final ChatColor
Represents green.static final ChatColor
Makes the text italic.static final ChatColor
Represents light purple.static final ChatColor
Represents magical characters that change around randomly.static final ChatColor
Represents red.static final ChatColor
Resets all previous chat colors or formats.static final ChatColor
Makes a line appear through the text.static final Pattern
Pattern to remove all colour codes.static final ChatColor
Makes the text appear underlined.static final ChatColor
Represents white.static final ChatColor
Represents yellow. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static ChatColor
getByChar
(char code) Get the colour represented by the specified code.int
hashCode()
name()
Deprecated.holdover from when this class was an enumstatic ChatColor
static ChatColor
int
ordinal()
Deprecated.holdover from when this class was an enumstatic String
stripColor
(String input) Strips the given message of all color codestoString()
static String
translateAlternateColorCodes
(char altColorChar, String textToTranslate) static ChatColor
Deprecated.holdover from when this class was an enumstatic ChatColor[]
values()
Deprecated.holdover from when this class was an enum
-
Field Details
-
COLOR_CHAR
public static final char COLOR_CHARThe special character which prefixes all chat colour codes. Use this if you need to dynamically convert colour codes from your custom format.- See Also:
-
ALL_CODES
- See Also:
-
STRIP_COLOR_PATTERN
Pattern to remove all colour codes. -
BLACK
Represents black. -
DARK_BLUE
Represents dark blue. -
DARK_GREEN
Represents dark green. -
DARK_AQUA
Represents dark blue (aqua). -
DARK_RED
Represents dark red. -
DARK_PURPLE
Represents dark purple. -
GOLD
Represents gold. -
GRAY
Represents gray. -
DARK_GRAY
Represents dark gray. -
BLUE
Represents blue. -
GREEN
Represents green. -
AQUA
Represents aqua. -
RED
Represents red. -
LIGHT_PURPLE
Represents light purple. -
YELLOW
Represents yellow. -
WHITE
Represents white. -
MAGIC
Represents magical characters that change around randomly. -
BOLD
Makes the text bold. -
STRIKETHROUGH
Makes a line appear through the text. -
UNDERLINE
Makes the text appear underlined. -
ITALIC
Makes the text italic. -
RESET
Resets all previous chat colors or formats.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
stripColor
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
-
getByChar
Get the colour represented by the specified code.- Parameters:
code
- the code to search for- Returns:
- the mapped colour, or null if non exists
-
of
-
of
-
valueOf
Deprecated.holdover from when this class was an enum- Parameters:
name
- color name- Returns:
- ChatColor
-
values
Deprecated.holdover from when this class was an enumGet an array of all defined colors and formats.- Returns:
- copied array of all colors and formats
-
name
Deprecated.holdover from when this class was an enumSeeEnum.name()
.- Returns:
- constant name
-
ordinal
Deprecated.holdover from when this class was an enumSeeEnum.ordinal()
.- Returns:
- ordinal
-