Home Getting Started With Scripts Commands Examples
BracketDumpers BracketHandlers BracketValidators

Style

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.

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

Static Methods

Return Type: Style

script.zs
// Style.empty() as Style
Style.empty();

Methods

Return Type: Style

script.zs
Style.applyFormat(format as ChatFormatting) as Style
ParameterTypeDescription
Parameter
format
Type
ChatFormatting
Description
No Description Provided

Return Type: Style

script.zs
Style.applyFormats(formattings as ChatFormatting[]) as Style
ParameterTypeDescription
Parameter
formattings
Type
ChatFormatting[]
Description
No Description Provided

Return Type: Style

script.zs
Style.applyLegacyFormat(format as ChatFormatting) as Style
ParameterTypeDescription
Parameter
format
Type
ChatFormatting
Description
No Description Provided

Return Type: Style

script.zs
Style.applyTo(style as Style) as Style
ParameterTypeDescription
Parameter
style
Type
Style
Description
No Description Provided

Return Type: TextColor

script.zs
// Style.getColor() as TextColor
myStyle.getColor();

Return Type: ResourceLocation

script.zs
// Style.getFont() as ResourceLocation
myStyle.getFont();

Return Type: invalid

script.zs
// Style.getInsertion() as invalid
myStyle.getInsertion();

Return Type: boolean

script.zs
// Style.isBold() as boolean
myStyle.isBold();

Return Type: boolean

script.zs
// Style.isEmpty() as boolean
myStyle.isEmpty();

Return Type: boolean

script.zs
// Style.isItalic() as boolean
myStyle.isItalic();

Return Type: boolean

script.zs
// Style.isObfuscated() as boolean
myStyle.isObfuscated();

Return Type: boolean

script.zs
// Style.isStrikethrough() as boolean
myStyle.isStrikethrough();

Return Type: boolean

script.zs
// Style.isUnderlined() as boolean
myStyle.isUnderlined();

Return Type: Style

script.zs
Style.withBold(value as invalid) as Style
ParameterTypeDescription
Parameter
value
Type
invalid
Description
No Description Provided

Return Type: Style

script.zs
Style.withColor(color as int) as Style
ParameterTypeDescription
Parameter
color
Type
int
Description
No Description Provided

Return Type: Style

script.zs
Style.withColor(formatting as ChatFormatting) as Style
ParameterTypeDescription
Parameter
formatting
Type
ChatFormatting
Description
No Description Provided

Return Type: Style

script.zs
Style.withColor(textColor as TextColor) as Style
ParameterTypeDescription
Parameter
textColor
Type
TextColor
Description
No Description Provided

Return Type: Style

script.zs
Style.withFont(fontId as ResourceLocation) as Style
ParameterTypeDescription
Parameter
fontId
Type
ResourceLocation
Description
No Description Provided

Return Type: Style

script.zs
Style.withInsertion(content as invalid) as Style
ParameterTypeDescription
Parameter
content
Type
invalid
Description
No Description Provided

Return Type: Style

script.zs
Style.withItalic(value as bool?) as Style
ParameterTypeDescription
Parameter
value
Type
bool?
Description
No Description Provided

Return Type: Style

script.zs
Style.withObfuscated(value as invalid) as Style
ParameterTypeDescription
Parameter
value
Type
invalid
Description
No Description Provided

Return Type: Style

script.zs
Style.withStrikethrough(value as invalid) as Style
ParameterTypeDescription
Parameter
value
Type
invalid
Description
No Description Provided

Return Type: Style

script.zs
Style.withUnderlined(value as invalid) as Style
ParameterTypeDescription
Parameter
value
Type
invalid
Description
No Description Provided

Properties

NameTypeHas GetterHas SetterDescription
Name
bold
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
color
Type
TextColor
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
empty
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
font
Type
ResourceLocation
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
insertion
Type
invalid
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
italic
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
obfucated
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
strikethrough
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
underlined
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided