public enum TextFormatting extends java.lang.Enum<TextFormatting>
Enum Constant and Description |
---|
AQUA |
BLACK |
BLUE |
BOLD |
DARK_AQUA |
DARK_BLUE |
DARK_GRAY |
DARK_GREEN |
DARK_PURPLE |
DARK_RED |
GOLD |
GRAY |
GREEN |
ITALIC |
LIGHT_PURPLE |
OBFUSCATED |
RED |
RESET |
STRIKETHROUGH |
UNDERLINE |
WHITE |
YELLOW |
Modifier and Type | Method and Description |
---|---|
static TextFormatting |
fromColorIndex(int index) |
int |
getColorIndex() |
java.lang.String |
getFriendlyName() |
static java.lang.String |
getTextWithoutFormattingCodes(java.lang.String text) |
static java.util.Collection<java.lang.String> |
getValidValues(boolean p_96296_0_,
boolean p_96296_1_) |
static TextFormatting |
getValueByName(java.lang.String friendlyName) |
boolean |
isColor() |
boolean |
isFancyStyling() |
java.lang.String |
toString() |
static TextFormatting |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TextFormatting[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TextFormatting BLACK
public static final TextFormatting DARK_BLUE
public static final TextFormatting DARK_GREEN
public static final TextFormatting DARK_AQUA
public static final TextFormatting DARK_RED
public static final TextFormatting DARK_PURPLE
public static final TextFormatting GOLD
public static final TextFormatting GRAY
public static final TextFormatting DARK_GRAY
public static final TextFormatting BLUE
public static final TextFormatting GREEN
public static final TextFormatting AQUA
public static final TextFormatting RED
public static final TextFormatting LIGHT_PURPLE
public static final TextFormatting YELLOW
public static final TextFormatting WHITE
public static final TextFormatting OBFUSCATED
public static final TextFormatting BOLD
public static final TextFormatting STRIKETHROUGH
public static final TextFormatting UNDERLINE
public static final TextFormatting ITALIC
public static final TextFormatting RESET
public static TextFormatting[] values()
for (TextFormatting c : TextFormatting.values()) System.out.println(c);
public static TextFormatting valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getColorIndex()
public boolean isFancyStyling()
public boolean isColor()
public java.lang.String getFriendlyName()
public java.lang.String toString()
toString
in class java.lang.Enum<TextFormatting>
@Nullable public static java.lang.String getTextWithoutFormattingCodes(@Nullable java.lang.String text)
@Nullable public static TextFormatting getValueByName(@Nullable java.lang.String friendlyName)
@Nullable public static TextFormatting fromColorIndex(int index)
public static java.util.Collection<java.lang.String> getValidValues(boolean p_96296_0_, boolean p_96296_1_)