Enum Class ChatFormatting
- All Implemented Interfaces:
Serializable, Comparable<ChatFormatting>, Constable, StringRepresentable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final charstatic final Codec<ChatFormatting> private final @Nullable Integerstatic final Codec<ChatFormatting> private static final Map<String, ChatFormatting> private final intprivate final booleanprivate final Stringstatic final charprivate static final Patternprivate final StringFields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateChatFormatting(String name, char code, boolean isFormat) privateChatFormatting(String name, char code, boolean isFormat, int id, @Nullable Integer color) privateChatFormatting(String name, char code, int id, @Nullable Integer color) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringstatic @Nullable ChatFormattinggetByCode(char code) static @Nullable ChatFormattinggetById(int id) static @Nullable ChatFormattingchargetChar()@Nullable IntegergetColor()intgetId()getName()static Collection<String> getNames(boolean getColors, boolean getFormats) booleanisColor()booleanisFormat()static @Nullable StringstripFormatting(@Nullable String input) toString()static ChatFormattingReturns the enum constant of this class with the specified name.static ChatFormatting[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BLACK
-
DARK_BLUE
-
DARK_GREEN
-
DARK_AQUA
-
DARK_RED
-
DARK_PURPLE
-
GOLD
-
GRAY
-
DARK_GRAY
-
BLUE
-
GREEN
-
AQUA
-
RED
-
LIGHT_PURPLE
-
YELLOW
-
WHITE
-
OBFUSCATED
-
BOLD
-
STRIKETHROUGH
-
UNDERLINE
-
ITALIC
-
RESET
-
-
Field Details
-
CODEC
-
COLOR_CODEC
-
PREFIX_CODE
public static final char PREFIX_CODE- See Also:
-
FORMATTING_BY_NAME
-
STRIP_FORMATTING_PATTERN
-
name
-
code
private final char code -
isFormat
private final boolean isFormat -
toString
-
id
private final int id -
color
-
-
Constructor Details
-
ChatFormatting
-
ChatFormatting
-
ChatFormatting
-
-
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
-
cleanName
-
getChar
public char getChar() -
getId
public int getId() -
isFormat
public boolean isFormat() -
isColor
public boolean isColor() -
getColor
-
getName
-
toString
- Overrides:
toStringin classEnum<ChatFormatting>
-
stripFormatting
-
getByName
-
getById
-
getByCode
-
getNames
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-