ChatFormatting
Link to chatformatting
Импорт класса
Link to импорт-класса
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 Copyimport crafttweaker.api.text.ChatFormatting;
Implemented Interfaces
Link to implemented-interfaces
ChatFormatting implements the following interfaces. That means all methods defined in these interfaces are also available in ChatFormatting
Enum Constants
Link to enum-constants
ChatFormatting is an enum. It has 22 enum constants. They are accessible using the code below.
ZenScript Copy<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>
Утилиты
Link to утилиты
Result Type | Является неявным |
---|---|
Result Type string | Является неявным true |
Result Type Стиль | Является неявным true |
Методы
Link to методы
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: int??
ZenScript Copy// ChatFormatting.getColor() as int??
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();
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter |
---|---|---|---|
Название id | Тип int | Имеет Getter true | Имеет Setter false |
Название isColor | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isFormat | Тип boolean | Имеет Getter true | Имеет Setter false |