类 ChatColor
java.lang.Object
net.md_5.bungee.api.ChatColor
Simplistic enumeration of all supported color values for chat.
-
字段概要
字段修饰符和类型字段说明static final Stringstatic final ChatColorRepresents aqua.static final ChatColorRepresents black.static final ChatColorRepresents blue.static final ChatColorMakes the text bold.static final charThe special character which prefixes all chat colour codes.static final ChatColorRepresents dark blue (aqua).static final ChatColorRepresents dark blue.static final ChatColorRepresents dark gray.static final ChatColorRepresents dark green.static final ChatColorRepresents dark purple.static final ChatColorRepresents dark red.static final ChatColorRepresents gold.static final ChatColorRepresents gray.static final ChatColorRepresents green.static final ChatColorMakes the text italic.static final ChatColorRepresents light purple.static final ChatColorRepresents magical characters that change around randomly.static final ChatColorRepresents red.static final ChatColorResets all previous chat colors or formats.static final ChatColorMakes a line appear through the text.static final PatternPattern to remove all colour codes.static final ChatColorMakes the text appear underlined.static final ChatColorRepresents white.static final ChatColorRepresents yellow. -
方法概要
修饰符和类型方法说明booleanstatic ChatColorgetByChar(char code) Get the colour represented by the specified code.inthashCode()name()已过时。holdover from when this class was an enumstatic ChatColorstatic ChatColorintordinal()已过时。holdover from when this class was an enumstatic StringstripColor(String input) Strips the given message of all color codestoString()static StringtranslateAlternateColorCodes(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
-