Enum Class ChatColors
- All Implemented Interfaces:
Serializable,Comparable<ChatColors>,Constable
聊天颜色
- Author:
- ybw0014
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatColorsfromChatColor(ChatColor chatColor) 根据聊天颜色返回对应的枚举toString()获取中文名称获取带颜色代码的颜色名static ChatColorsReturns the enum constant of this class with the specified name.static ChatColors[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AQUA
天蓝色 -
BLACK
黑色 -
BLUE
蓝色 -
BOLD
加粗 -
DARK_AQUA
湖蓝色 -
DARK_BLUE
深蓝色 -
DARK_GRAY
深灰色 -
DARK_GREEN
深绿色 -
DARK_PURPLE
紫色 -
DARK_RED
深红色 -
GOLD
金色 -
GRAY
灰色 -
GREEN
绿色 -
ITALIC
斜体 -
LIGHT_PURPLE
粉红色 -
MAGIC
随机 -
RED
红色 -
RESET
重置 -
STRIKETHROUGH
删除线 -
UNDERLINE
下划线 -
WHITE
白色 -
YELLOW
黄色
-
-
Field Details
-
COLOR_CHAR
public static final char COLOR_CHAR颜色代码前缀- See Also:
-
-
Method Details
-
values
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
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
-
fromChatColor
根据聊天颜色返回对应的枚举- Parameters:
chatColor-ChatColor聊天颜色- Returns:
- 对应的枚举
-
toString
获取中文名称- Overrides:
toStringin classEnum<ChatColors>- Returns:
- 中文名称
-
toStringWithColor
获取带颜色代码的颜色名- Returns:
- 带颜色代码的颜色名
-