public final class ChatColor extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALL_CODES |
static ChatColor |
AQUA
Represents aqua.
|
static ChatColor |
BLACK
Represents black.
|
static ChatColor |
BLUE
Represents blue.
|
static ChatColor |
BOLD
Makes the text bold.
|
static char |
COLOR_CHAR
The special character which prefixes all chat colour codes.
|
static ChatColor |
DARK_AQUA
Represents dark blue (aqua).
|
static ChatColor |
DARK_BLUE
Represents dark blue.
|
static ChatColor |
DARK_GRAY
Represents dark gray.
|
static ChatColor |
DARK_GREEN
Represents dark green.
|
static ChatColor |
DARK_PURPLE
Represents dark purple.
|
static ChatColor |
DARK_RED
Represents dark red.
|
static ChatColor |
GOLD
Represents gold.
|
static ChatColor |
GRAY
Represents gray.
|
static ChatColor |
GREEN
Represents green.
|
static ChatColor |
ITALIC
Makes the text italic.
|
static ChatColor |
LIGHT_PURPLE
Represents light purple.
|
static ChatColor |
MAGIC
Represents magical characters that change around randomly.
|
static ChatColor |
RED
Represents red.
|
static ChatColor |
RESET
Resets all previous chat colors or formats.
|
static ChatColor |
STRIKETHROUGH
Makes a line appear through the text.
|
static Pattern |
STRIP_COLOR_PATTERN
Pattern to remove all colour codes.
|
static ChatColor |
UNDERLINE
Makes the text appear underlined.
|
static ChatColor |
WHITE
Represents white.
|
static ChatColor |
YELLOW
Represents yellow.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static ChatColor |
getByChar(char code)
Get the colour represented by the specified code.
|
Color |
getColor()
The RGB color of the ChatColor.
|
String |
getName() |
int |
hashCode() |
String |
name()
Deprecated.
holdover from when this class was an enum
|
static ChatColor |
of(Color color) |
static ChatColor |
of(String string) |
int |
ordinal()
Deprecated.
holdover from when this class was an enum
|
static String |
stripColor(String input)
Strips the given message of all color codes
|
String |
toString() |
static String |
translateAlternateColorCodes(char altColorChar,
String textToTranslate) |
static ChatColor |
valueOf(String name)
Deprecated.
holdover from when this class was an enum
|
static ChatColor[] |
values()
Deprecated.
holdover from when this class was an enum
|
public static final char COLOR_CHAR
public static final String ALL_CODES
public static final Pattern STRIP_COLOR_PATTERN
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 String stripColor(String input)
input
- String to strip of colorpublic static String translateAlternateColorCodes(char altColorChar, String textToTranslate)
public static ChatColor getByChar(char code)
code
- the code to search for@Deprecated public static ChatColor valueOf(String name)
name
- color name@Deprecated public static ChatColor[] values()
@Deprecated public String name()
Enum.name()
.@Deprecated public int ordinal()
Enum.ordinal()
.public String getName()
public Color getColor()
Copyright © 2012–2020 SpigotMC. All rights reserved.