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.
import crafttweaker.api.text.Style;
Static Methods
Return Type: Style
// Style.empty() as Style
Style.empty();
Methods
Return Type: Style
Style.applyFormat(format as ChatFormatting) as Style
Parameter | Type | Description |
---|---|---|
Parameter format | Type ChatFormatting | Description No Description Provided |
Return Type: Style
Style.applyFormats(formattings as ChatFormatting[]) as Style
Parameter | Type | Description |
---|---|---|
Parameter formattings | Type ChatFormatting[] | Description No Description Provided |
Return Type: Style
Style.applyLegacyFormat(format as ChatFormatting) as Style
Parameter | Type | Description |
---|---|---|
Parameter format | Type ChatFormatting | Description No Description Provided |
Return Type: TextColor
// Style.getColor() as TextColor
myStyle.getColor();
Return Type: ResourceLocation
// Style.getFont() as ResourceLocation
myStyle.getFont();
Return Type: invalid
// Style.getInsertion() as invalid
myStyle.getInsertion();
Return Type: boolean
// Style.isBold() as boolean
myStyle.isBold();
Return Type: boolean
// Style.isEmpty() as boolean
myStyle.isEmpty();
Return Type: boolean
// Style.isItalic() as boolean
myStyle.isItalic();
Return Type: boolean
// Style.isObfuscated() as boolean
myStyle.isObfuscated();
Return Type: boolean
// Style.isStrikethrough() as boolean
myStyle.isStrikethrough();
Return Type: boolean
// Style.isUnderlined() as boolean
myStyle.isUnderlined();
Return Type: Style
Style.withBold(value as invalid) as Style
Parameter | Type | Description |
---|---|---|
Parameter value | Type invalid | Description No Description Provided |
Return Type: Style
Style.withColor(color as int) as Style
Parameter | Type | Description |
---|---|---|
Parameter color | Type int | Description No Description Provided |
Return Type: Style
Style.withColor(formatting as ChatFormatting) as Style
Parameter | Type | Description |
---|---|---|
Parameter formatting | Type ChatFormatting | Description No Description Provided |
Return Type: Style
Style.withFont(fontId as ResourceLocation) as Style
Parameter | Type | Description |
---|---|---|
Parameter fontId | Type ResourceLocation | Description No Description Provided |
Return Type: Style
Style.withInsertion(content as invalid) as Style
Parameter | Type | Description |
---|---|---|
Parameter content | Type invalid | Description No Description Provided |
Return Type: Style
Style.withItalic(value as bool?) as Style
Parameter | Type | Description |
---|---|---|
Parameter value | Type bool? | Description No Description Provided |
Return Type: Style
Style.withObfuscated(value as invalid) as Style
Parameter | Type | Description |
---|---|---|
Parameter value | Type invalid | Description No Description Provided |
Return Type: Style
Style.withStrikethrough(value as invalid) as Style
Parameter | Type | Description |
---|---|---|
Parameter value | Type invalid | Description No Description Provided |
Return Type: Style
Style.withUnderlined(value as invalid) as Style
Parameter | Type | Description |
---|---|---|
Parameter value | Type invalid | Description No Description Provided |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
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 |