HomeCommandsExamplesGetting Started With ScriptsGlobal Keywords
BracketDumpersBracketHandlersBracketValidatorsResourceLocationBracketHandler

ChatFormatting

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.text.ChatFormatting;

Implements

ChatFormatting implements the following interfaces:

StringRepresentable

Undocumented Interfaces

Comparable<Enum>

Enum Constants

ChatFormatting is an enum with 22 constants. They are accessible like so:

script.zs
// ChatFormatting.AQUA
<constant:minecraft:formatting:aqua>
// ChatFormatting.BLACK
<constant:minecraft:formatting:black>
// ChatFormatting.BLUE
<constant:minecraft:formatting:blue>
// ChatFormatting.BOLD
<constant:minecraft:formatting:bold>
// ChatFormatting.DARK_AQUA
<constant:minecraft:formatting:dark_aqua>
// ChatFormatting.DARK_BLUE
<constant:minecraft:formatting:dark_blue>
// ChatFormatting.DARK_GRAY
<constant:minecraft:formatting:dark_gray>
// ChatFormatting.DARK_GREEN
<constant:minecraft:formatting:dark_green>
// ChatFormatting.DARK_PURPLE
<constant:minecraft:formatting:dark_purple>
// ChatFormatting.DARK_RED
<constant:minecraft:formatting:dark_red>
// ChatFormatting.GOLD
<constant:minecraft:formatting:gold>
// ChatFormatting.GRAY
<constant:minecraft:formatting:gray>
// ChatFormatting.GREEN
<constant:minecraft:formatting:green>
// ChatFormatting.ITALIC
<constant:minecraft:formatting:italic>
// ChatFormatting.LIGHT_PURPLE
<constant:minecraft:formatting:light_purple>
// ChatFormatting.OBFUSCATED
<constant:minecraft:formatting:obfuscated>
// ChatFormatting.RED
<constant:minecraft:formatting:red>
// ChatFormatting.RESET
<constant:minecraft:formatting:reset>
// ChatFormatting.STRIKETHROUGH
<constant:minecraft:formatting:strikethrough>
// ChatFormatting.UNDERLINE
<constant:minecraft:formatting:underline>
// ChatFormatting.WHITE
<constant:minecraft:formatting:white>
// ChatFormatting.YELLOW
<constant:minecraft:formatting:yellow>

Members

asStyle() as Style
script.zs
// ChatFormatting.asStyle() as Style;
<constant:minecraft:formatting:aqua>.asStyle();

Return Type: Style

implicit as Style
script.zs
// ChatFormatting as Style
<constant:minecraft:formatting:aqua> as Style

Return Type: Style

color() as Integer
script.zs
// ChatFormatting.color() as Integer;
<constant:minecraft:formatting:aqua>.color();

Return Type: Integer

getChar() as char
script.zs
// ChatFormatting.getChar() as char;
<constant:minecraft:formatting:aqua>.getChar();

Return Type: char

getName() as string
script.zs
// ChatFormatting.getName() as string;
<constant:minecraft:formatting:aqua>.getName();

Return Type: string

Getter
script.zs
// ChatFormatting.id as int
<constant:minecraft:formatting:aqua>.id

Return Type: int

id() as int
script.zs
// ChatFormatting.id() as int;
<constant:minecraft:formatting:aqua>.id();

Return Type: int

Getter
script.zs
// ChatFormatting.isColor as bool
<constant:minecraft:formatting:aqua>.isColor

Return Type: bool

isColor() as bool
script.zs
// ChatFormatting.isColor() as bool;
<constant:minecraft:formatting:aqua>.isColor();

Return Type: bool

Getter
script.zs
// ChatFormatting.isFormat as bool
<constant:minecraft:formatting:aqua>.isFormat

Return Type: bool

isFormat() as bool
script.zs
// ChatFormatting.isFormat() as bool;
<constant:minecraft:formatting:aqua>.isFormat();

Return Type: bool

Getter
Gets the serialized name.
script.zs
// ChatFormatting.serializedName as string
<constant:minecraft:formatting:aqua>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// ChatFormatting.serializedName() as string;
<constant:minecraft:formatting:aqua>.serializedName();

Return Type: string

toString() as string
script.zs
// ChatFormatting.toString() as string;
<constant:minecraft:formatting:aqua>.toString();

Return Type: string

implicit as string
script.zs
// ChatFormatting as string
<constant:minecraft:formatting:aqua> as string

Return Type: string