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.
import crafttweaker.api.text.Style;
Members
applyFormat(format as ChatFormatting) as Style
myStyle.applyFormat(myChatFormatting);
Parameters:
format: ChatFormatting
Type: ChatFormatting
Return Type:
Style
applyFormats(formattings as ChatFormatting[]) as Style
myStyle.applyFormats(myChatFormatting[]);
Parameters:
formattings: ChatFormatting[]
Type: ChatFormatting[]
Return Type:
Style
applyLegacyFormat(format as ChatFormatting) as Style
myStyle.applyLegacyFormat(myChatFormatting);
Parameters:
format: ChatFormatting
Type: ChatFormatting
Return Type:
Style
Getter
// Style.bold as boolmyStyle.bold
Return Type:
bool
bold() as bool
// Style.bold() as bool;myStyle.bold();
Return Type:
bool
Getter
// Style.font as ResourceLocationmyStyle.font
Return Type:
ResourceLocation
font() as ResourceLocation
Getter
// Style.insertion as stringmyStyle.insertion
Return Type:
string
insertion() as string
// Style.insertion() as string;myStyle.insertion();
Return Type:
string
Getter
// Style.italic as boolmyStyle.italic
Return Type:
bool
italic() as bool
// Style.italic() as bool;myStyle.italic();
Return Type:
bool
Getter
// Style.obfucated as boolmyStyle.obfucated
Return Type:
bool
obfucated() as bool
// Style.obfucated() as bool;myStyle.obfucated();
Return Type:
bool
Getter
// Style.strikethrough as boolmyStyle.strikethrough
Return Type:
bool
strikethrough() as bool
// Style.strikethrough() as bool;myStyle.strikethrough();
Return Type:
bool
Getter
// Style.underlined as boolmyStyle.underlined
Return Type:
bool
underlined() as bool
// Style.underlined() as bool;myStyle.underlined();
Return Type:
bool
withColor(textColor as TextColor) as Style
withColor(formatting as ChatFormatting) as Style
myStyle.withColor(myChatFormatting);
Parameters:
formatting: ChatFormatting
Type: ChatFormatting
Return Type:
Style
withColor(color as int) as Style
withFont(fontId as ResourceLocation) as Style
myStyle.withFont(myResourceLocation);
Parameters:
fontId: ResourceLocation
Type: ResourceLocation
Return Type:
Style