Package com.marcpg.libpg.color
Enum Class McFormat
- All Implemented Interfaces:
Serializable
,Comparable<McFormat>
,Constable
- Since:
- 0.0.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLight AquaBlackLight BlueBoldDark AquaDark BlueDark GrayDark RedGold / OrangeLight GrayDark GreenItalicLight Green / LimeMakes the text constantly changeAmethyst ColorCopper ColorDiamond ColorEmerald ColorGold ColorIron ColorLapislazuli ColorNetherite ColorQuartz ColorRedstone ColorMinecoin ColorLight PinkPurple / MagentaLight RedReset the color to the default oneStrikethroughUnderlinedWhiteYellow -
Field Summary
Modifier and TypeFieldDescriptionfinal Integer
The ANSI escape codefinal boolean
If the color can be used in Minecraft: Bedrock Editionfinal char
The Minecraft color codefinal String
The color's hexadecimal codefinal boolean
If the color can be used in Minecraft: Java Edition -
Method Summary
Modifier and TypeMethodDescription@NotNull String
ansi()
Get the color's equivalent ANSI escape code.@NotNull Color
awtColor()
Get the color's equivalentJava AWT color
.@NotNull String
Get the color as a Minecraft chat color.@NotNull String
Get the color's equivalent console ANSI escape code that can be used to format the console.@NotNull String
toString()
static McFormat
Returns the enum constant of this class with the specified name.static McFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RESET
Reset the color to the default one -
MAGIC
Makes the text constantly change -
BOLD
Bold -
ITALIC
Italic -
STRIKETHROUGH
Strikethrough -
UNDERLINED
Underlined -
DARK_RED
Dark Red -
RED
Light Red -
GOLD
Gold / Orange -
YELLOW
Yellow -
GREEN
Dark Green -
LIME
Light Green / Lime -
AQUA
Light Aqua -
DARK_AQUA
Dark Aqua -
DARK_BLUE
Dark Blue -
BLUE
Light Blue -
PINK
Light Pink -
PURPLE
Purple / Magenta -
WHITE
White -
GRAY
Light Gray -
DARK_GRAY
Dark Gray -
BLACK
Black -
MINECOIN_GOLD
Minecoin Color -
MATERIAL_QUARTZ
Quartz Color -
MATERIAL_IRON
Iron Color -
MATERIAL_NETHERITE
Netherite Color -
MATERIAL_REDSTONE
Redstone Color -
MATERIAL_COPPER
Copper Color -
MATERIAL_GOLD
Gold Color -
MATERIAL_EMERALD
Emerald Color -
MATERIAL_DIAMOND
Diamond Color -
MATERIAL_LAPIS
Lapislazuli Color -
MATERIAL_AMETHYST
Amethyst Color
-
-
Field Details
-
code
public final char codeThe Minecraft color code -
hex
The color's hexadecimal code -
java
public final boolean javaIf the color can be used in Minecraft: Java Edition -
bedrock
public final boolean bedrockIf the color can be used in Minecraft: Bedrock Edition -
ansiCode
The ANSI escape code
-
-
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
-
chatColor
- Returns:
- § + the code, so you can use it in text.
- Since:
- 0.0.1
-
awtColor
Get the color's equivalentJava AWT color
.- Returns:
- Equivalent
Java AWT color
- Since:
- 0.0.1
-
ansi
Get the color's equivalent ANSI escape code.- Returns:
- Equivalent ANSI escape code
- Since:
- 0.0.1
-
consoleAnsi
Get the color's equivalent console ANSI escape code that can be used to format the console.- Returns:
- Equivalent console ANSI escape code
- Since:
- 0.0.1
-
toString
-