public enum ChatColor extends Enum<ChatColor>
These should be self-explanatory, if you need more help, take a look at Minecraft Wiki.
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 String |
consoleFormat(ChatColor color)
Returns the console color representation of the chat color
|
static char |
magicCharacter()
Obtains the section symbol preceeding chat colors
|
static ChatColor |
of(char color)
Finds the color based on the character after a the section symbol (§)
|
static ChatColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChatColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChatColor DARK_GREEN
public static final ChatColor DARK_PURPLE
public static final ChatColor LIGHT_PURPLE
public static final ChatColor OBFUSCATED
public static final ChatColor STRIKETHROUGH
public static ChatColor[] values()
for (ChatColor c : ChatColor.values()) System.out.println(c);
public static ChatColor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nullable public static ChatColor of(char color)
color
- the character after the sectionpublic static char magicCharacter()
public static String consoleFormat(ChatColor color)
Supported colors:
color
- the color to parseCopyright © 2016. All rights reserved.