Importing the class

Link to importing-the-class

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.Style;

Name: empty

Return Type: Style

ZenScript
Copy
// Style.empty() as Style

Style.empty();

Name: applyFormat

Return Type: Style

ZenScript
Copy
Style.applyFormat(format as ChatFormatting) as Style
ParameterType
Parameter
format
Type
ChatFormatting

Name: applyFormats

Return Type: Style

ZenScript
Copy
Style.applyFormats(formattings as ChatFormatting[]) as Style
ParameterType
Parameter
formattings
Type
ChatFormatting[]

Link to applyLegacyFormat

Name: applyLegacyFormat

Return Type: Style

ZenScript
Copy
Style.applyLegacyFormat(format as ChatFormatting) as Style
ParameterType
Parameter
format
Type
ChatFormatting

Name: applyTo

Return Type: Style

ZenScript
Copy
Style.applyTo(style as Style) as Style
ParameterType
Parameter
style
Type
Style

Name: getColor

Return Type: TextColor?

ZenScript
Copy
// Style.getColor() as TextColor?

myStyle.getColor();

Name: getFont

Return Type: ResourceLocation

ZenScript
Copy
// Style.getFont() as ResourceLocation

myStyle.getFont();

Name: getInsertion

Return Type: string?

ZenScript
Copy
// Style.getInsertion() as string?

myStyle.getInsertion();

Name: isBold

Return Type: boolean

ZenScript
Copy
// Style.isBold() as boolean

myStyle.isBold();

Name: isEmpty

Return Type: boolean

ZenScript
Copy
// Style.isEmpty() as boolean

myStyle.isEmpty();

Name: isItalic

Return Type: boolean

ZenScript
Copy
// Style.isItalic() as boolean

myStyle.isItalic();

Name: isObfuscated

Return Type: boolean

ZenScript
Copy
// Style.isObfuscated() as boolean

myStyle.isObfuscated();

Name: isStrikethrough

Return Type: boolean

ZenScript
Copy
// Style.isStrikethrough() as boolean

myStyle.isStrikethrough();

Name: isUnderlined

Return Type: boolean

ZenScript
Copy
// Style.isUnderlined() as boolean

myStyle.isUnderlined();

Name: setBold

Return Type: Style

ZenScript
Copy
// Style.setBold() as Style

myStyle.setBold();

Name: setItalic

Return Type: Style

ZenScript
Copy
// Style.setItalic() as Style

myStyle.setItalic();

Name: setObfuscated

Return Type: Style

ZenScript
Copy
// Style.setObfuscated() as Style

myStyle.setObfuscated();

Link to setStrikethrough

Name: setStrikethrough

Return Type: Style

ZenScript
Copy
// Style.setStrikethrough() as Style

myStyle.setStrikethrough();

Name: setUnderlined

Return Type: Style

ZenScript
Copy
// Style.setUnderlined() as Style

myStyle.setUnderlined();

Name: withBold

Return Type: Style

ZenScript
Copy
Style.withBold(value as bool?) as Style
ParameterType
Parameter
value
Type
bool?

Name: withColor

Return Type: Style

ZenScript
Copy
Style.withColor(color as int) as Style
ParameterType
Parameter
color
Type
int

Name: withColor

Return Type: Style

ZenScript
Copy
Style.withColor(formatting as ChatFormatting?) as Style
ParameterType
Parameter
mise en forme
Type
ChatFormatting?

Name: withColor

Return Type: Style

ZenScript
Copy
Style.withColor(textColor as TextColor?) as Style
ParameterType
Parameter
textColor
Type
TextColor?

Name: withFont

Return Type: Style

ZenScript
Copy
Style.withFont(fontId as ResourceLocation?) as Style
ParameterType
Parameter
fontId
Type
ResourceLocation?

Name: withInsertion

Return Type: Style

ZenScript
Copy
Style.withInsertion(content as string?) as Style
ParameterType
Parameter
contenu
Type
string?

Name: withItalic

Return Type: Style

ZenScript
Copy
Style.withItalic(value as bool?) as Style
ParameterType
Parameter
value
Type
bool?

Name: withObfuscated

Return Type: Style

ZenScript
Copy
Style.withObfuscated(value as bool?) as Style
ParameterType
Parameter
value
Type
bool?

Link to withStrikethrough

Name: withStrikethrough

Return Type: Style

ZenScript
Copy
Style.withStrikethrough(value as bool?) as Style
ParameterType
Parameter
value
Type
bool?

Name: withUnderlined

Return Type: Style

ZenScript
Copy
Style.withUnderlined(value as bool?) as Style
ParameterType
Parameter
value
Type
bool?
NameTypeHas GetterHas Setter
Name
bold
Type
boolean
Has Getter
true
Has Setter
false
Name
color
Type
TextColor?
Has Getter
true
Has Setter
false
Name
empty
Type
boolean
Has Getter
true
Has Setter
false
Name
font
Type
ResourceLocation
Has Getter
true
Has Setter
false
Name
insertion
Type
string?
Has Getter
true
Has Setter
false
Name
italic
Type
boolean
Has Getter
true
Has Setter
false
Name
obfucated
Type
boolean
Has Getter
true
Has Setter
false
Name
strikethrough
Type
boolean
Has Getter
true
Has Setter
false
Name
souligné
Type
boolean
Has Getter
true
Has Setter
false