It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker . api.text . ChatFormatting;
ChatFormatting is an enum. It has 22 enum constants. They are accessible using the code below.
< constant : minecraft:formatting:black >
< constant : minecraft:formatting:dark_blue >
< constant : minecraft:formatting:dark_green >
< constant : minecraft:formatting:dark_aqua >
< constant : minecraft:formatting:dark_red >
< constant : minecraft:formatting:dark_purple >
< constant : minecraft:formatting:gold >
< constant : minecraft:formatting:gray >
< constant : minecraft:formatting:dark_gray >
< constant : minecraft:formatting:blue >
< constant : minecraft:formatting:green >
< constant : minecraft:formatting:aqua >
< constant : minecraft:formatting:red >
< constant : minecraft:formatting:light_purple >
< constant : minecraft:formatting:yellow >
< constant : minecraft:formatting:white >
< constant : minecraft:formatting:obfuscated >
< constant : minecraft:formatting:bold >
< constant : minecraft:formatting:strikethrough >
< constant : minecraft:formatting:underline >
< constant : minecraft:formatting:italic >
< constant : minecraft:formatting:reset >
Result Type Is Implicit Result Type
string Is Implicit
true Result Type
Style Is Implicit
true
Return Type: Style
// ChatFormatting.asStyle() as Style
myChatFormatting . asStyle();
Return Type: char
// ChatFormatting.getChar() as char
myChatFormatting . getChar();
Return Type: int??
// ChatFormatting.getColor() as int??
myChatFormatting . getColor();
Return Type: int
// ChatFormatting.getId() as int
myChatFormatting . getId();
Return Type: string
// ChatFormatting.getName() as string
myChatFormatting . getName();
Return Type: boolean
// ChatFormatting.isColor() as boolean
myChatFormatting . isColor();
Return Type: boolean
// ChatFormatting.isFormat() as boolean
myChatFormatting . isFormat();
Return Type: string
// ChatFormatting.toString() as string
myChatFormatting . toString();
Name Type Has Getter Has Setter Name
id Type
int Has Getter
true Has Setter
false Name
isColor Type
boolean Has Getter
true Has Setter
false Name
isFormat Type
boolean Has Getter
true Has Setter
false