Importare la Classe

Link to importare-la-classe

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.

ZenScript
Copy
import crafttweaker.api.text.ChatFormatting;

ChatFormatting is an enum. It has 22 enum constants. They are accessible using the code below.

ZenScript
Copy
ChatFormatting.BLACK
ChatFormatting.DARK_BLUE
ChatFormatting.DARK_GREEN
ChatFormatting.DARK_AQUA
ChatFormatting.DARK_RED
ChatFormatting.DARK_PURPLE
ChatFormatting.GOLD
ChatFormatting.GRAY
ChatFormatting.DARK_GRAY
ChatFormatting.BLUE
ChatFormatting.GREEN
ChatFormatting.AQUA
ChatFormatting.RED
ChatFormatting.LIGHT_PURPLE
ChatFormatting.YELLOW
ChatFormatting.WHITE
ChatFormatting.OBFUSCATED
ChatFormatting.BOLD
ChatFormatting.STRIKETHROUGH
ChatFormatting.UNDERLINE
ChatFormatting.ITALIC
ChatFormatting.RESET
Tipo RisultatoImplicito
Tipo Risultato
string
Implicito
Tipo Risultato
Style
Implicito

Name: asStyle

Return Type: Style

ZenScript
Copy
// ChatFormatting.asStyle() as Style

myChatFormatting.asStyle();

Name: getChar

Return Type: char

ZenScript
Copy
// ChatFormatting.getChar() as char

myChatFormatting.getChar();

Name: getColor

Return Type: invalid

ZenScript
Copy
// ChatFormatting.getColor() as invalid

myChatFormatting.getColor();

Name: getId

Return Type: int

ZenScript
Copy
// ChatFormatting.getId() as int

myChatFormatting.getId();

Name: getName

Return Type: string

ZenScript
Copy
// ChatFormatting.getName() as string

myChatFormatting.getName();

Name: isColor

Return Type: boolean

ZenScript
Copy
// ChatFormatting.isColor() as boolean

myChatFormatting.isColor();

Name: isFormat

Return Type: boolean

ZenScript
Copy
// ChatFormatting.isFormat() as boolean

myChatFormatting.isFormat();

Name: toString

Return Type: string

ZenScript
Copy
// ChatFormatting.toString() as string

myChatFormatting.toString();
NomeTipoHa GetterHa SetterDescrizione
Nome
id
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
isColor
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
isFormat
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided