Package net.minecraft
Enum Class ChatFormatting
- All Implemented Interfaces:
Serializable
,Comparable<ChatFormatting>
,Constable
,StringRepresentable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
-
Enum Constant Summary
Enum ConstantDescription -
Field Summary
Modifier and TypeFieldDescriptionprivate final char
static final com.mojang.serialization.Codec
<ChatFormatting> private final Integer
private static final Map
<String, ChatFormatting> private final int
private final boolean
private final String
static final char
private static final Pattern
private final String
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
ChatFormatting
(String p_126634_, char p_126635_, boolean p_126636_) private
ChatFormatting
(String p_126640_, char p_126641_, boolean p_126642_, int p_126643_, Integer p_126644_) private
ChatFormatting
(String p_126627_, char p_126628_, int p_126629_, Integer p_126630_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
static ChatFormatting
getByCode
(char p_126646_) static ChatFormatting
getById
(int p_126648_) static ChatFormatting
char
getChar()
getColor()
int
getId()
getName()
static Collection
<String> getNames
(boolean p_126654_, boolean p_126655_) boolean
isColor()
boolean
isFormat()
static String
stripFormatting
(String p_126650_) toString()
static ChatFormatting
Returns 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
-
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:
toString
in classEnum<ChatFormatting>
-
stripFormatting
-
getByName
-
getById
-
getByCode
-
getNames
-
getSerializedName
- Specified by:
getSerializedName
in interfaceStringRepresentable
-