HomeCommandsExamplesGetting Started With ScriptsGlobal Keywords
BracketDumpersBracketHandlersBracketValidatorsResourceLocationBracketHandler

Style

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

Members

applyFormat(format as ChatFormatting) as Style
script.zs
// Style.applyFormat(format as ChatFormatting) as Style;
myStyle.applyFormat(myChatFormatting);

Parameters:

Return Type: Style

applyFormats(formattings as ChatFormatting[]) as Style
script.zs
// Style.applyFormats(formattings as ChatFormatting[]) as Style;
myStyle.applyFormats(myChatFormatting[]);

Parameters:

formattings Type: ChatFormatting[]

Return Type: Style

applyLegacyFormat(format as ChatFormatting) as Style
script.zs
// Style.applyLegacyFormat(format as ChatFormatting) as Style;
myStyle.applyLegacyFormat(myChatFormatting);

Parameters:

Return Type: Style

applyTo(style as Style) as Style
script.zs
// Style.applyTo(style as Style) as Style;
myStyle.applyTo(myStyle);

Parameters:

style Type: Style

Return Type: Style

Getter
script.zs
// Style.bold as bool
myStyle.bold

Return Type: bool

bold() as bool
script.zs
// Style.bold() as bool;
myStyle.bold();

Return Type: bool

Getter
script.zs
// Style.color as TextColor
myStyle.color

Return Type: TextColor

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

Return Type: TextColor

Getter
script.zs
// Style.empty as bool
myStyle.empty

Return Type: bool

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

Return Type: Style

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

Return Type: bool

Getter
script.zs
// Style.font as ResourceLocation
myStyle.font

Return Type: ResourceLocation

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

Return Type: ResourceLocation

Getter
script.zs
// Style.insertion as string
myStyle.insertion

Return Type: string

insertion() as string
script.zs
// Style.insertion() as string;
myStyle.insertion();

Return Type: string

Getter
script.zs
// Style.italic as bool
myStyle.italic

Return Type: bool

italic() as bool
script.zs
// Style.italic() as bool;
myStyle.italic();

Return Type: bool

Getter
script.zs
// Style.obfucated as bool
myStyle.obfucated

Return Type: bool

obfucated() as bool
script.zs
// Style.obfucated() as bool;
myStyle.obfucated();

Return Type: bool

setBold() as Style
script.zs
// Style.setBold() as Style;
myStyle.setBold();

Return Type: Style

setItalic() as Style
script.zs
// Style.setItalic() as Style;
myStyle.setItalic();

Return Type: Style

setObfuscated() as Style
script.zs
// Style.setObfuscated() as Style;
myStyle.setObfuscated();

Return Type: Style

setStrikethrough() as Style
script.zs
// Style.setStrikethrough() as Style;
myStyle.setStrikethrough();

Return Type: Style

setUnderlined() as Style
script.zs
// Style.setUnderlined() as Style;
myStyle.setUnderlined();

Return Type: Style

Getter
script.zs
// Style.strikethrough as bool
myStyle.strikethrough

Return Type: bool

strikethrough() as bool
script.zs
// Style.strikethrough() as bool;
myStyle.strikethrough();

Return Type: bool

Getter
script.zs
// Style.underlined as bool
myStyle.underlined

Return Type: bool

underlined() as bool
script.zs
// Style.underlined() as bool;
myStyle.underlined();

Return Type: bool

withBold(value as Boolean) as Style
script.zs
// Style.withBold(value as Boolean) as Style;
myStyle.withBold(myBoolean);

Parameters:

value Type: Boolean

Return Type: Style

withColor(textColor as TextColor) as Style
script.zs
// Style.withColor(textColor as TextColor) as Style;
myStyle.withColor(myTextColor);

Parameters:

textColor Type: TextColor

Return Type: Style

withColor(formatting as ChatFormatting) as Style
script.zs
// Style.withColor(formatting as ChatFormatting) as Style;
myStyle.withColor(myChatFormatting);

Parameters:

formatting Type: ChatFormatting

Return Type: Style

withColor(color as int) as Style
script.zs
// Style.withColor(color as int) as Style;
myStyle.withColor(myInt);

Parameters:

color Type: int

Return Type: Style

withFont(fontId as ResourceLocation) as Style
script.zs
// Style.withFont(fontId as ResourceLocation) as Style;
myStyle.withFont(myResourceLocation);

Parameters:

Return Type: Style

withInsertion(content as string) as Style
script.zs
// Style.withInsertion(content as string) as Style;
myStyle.withInsertion(myString);

Parameters:

content Type: string

Return Type: Style

withItalic(value as Boolean) as Style
script.zs
// Style.withItalic(value as Boolean) as Style;
myStyle.withItalic(myBoolean);

Parameters:

value Type: Boolean

Return Type: Style

withObfuscated(value as Boolean) as Style
script.zs
// Style.withObfuscated(value as Boolean) as Style;
myStyle.withObfuscated(myBoolean);

Parameters:

value Type: Boolean

Return Type: Style

withStrikethrough(value as Boolean) as Style
script.zs
// Style.withStrikethrough(value as Boolean) as Style;
myStyle.withStrikethrough(myBoolean);

Parameters:

value Type: Boolean

Return Type: Style

withUnderlined(value as Boolean) as Style
script.zs
// Style.withUnderlined(value as Boolean) as Style;
myStyle.withUnderlined(myBoolean);

Parameters:

value Type: Boolean

Return Type: Style