类 ChatColor
java.lang.Object
net.md_5.bungee.api.ChatColor
Simplistic enumeration of all supported color values for chat.
-
字段概要
字段修饰符和类型字段说明static 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. -
方法概要
修饰符和类型方法说明boolean
static ChatColor
getByChar
(char code) Get the colour represented by the specified code.int
hashCode()
name()
已过时。holdover from when this class was an enumstatic ChatColor
static ChatColor
int
ordinal()
已过时。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
已过时。holdover from when this class was an enumstatic ChatColor[]
values()
已过时。holdover from when this class was an enum
-
字段详细资料
-
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.- 另请参阅:
-
ALL_CODES
- 另请参阅:
-
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.
-
-
方法详细资料
-
hashCode
public int hashCode() -
equals
-
toString
-
stripColor
Strips the given message of all color codes- 参数:
input
- String to strip of color- 返回:
- A copy of the input string, without any coloring
-
translateAlternateColorCodes
-
getByChar
Get the colour represented by the specified code.- 参数:
code
- the code to search for- 返回:
- the mapped colour, or null if non exists
-
of
-
of
-
valueOf
已过时。holdover from when this class was an enum- 参数:
name
- color name- 返回:
- ChatColor
-
values
已过时。holdover from when this class was an enumGet an array of all defined colors and formats.- 返回:
- copied array of all colors and formats
-
name
已过时。holdover from when this class was an enumSeeEnum.name()
.- 返回:
- constant name
-
ordinal
已过时。holdover from when this class was an enumSeeEnum.ordinal()
.- 返回:
- ordinal
-