MCTextComponent
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.
Static Methods
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter text | Type string | Description No Description Provided |
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter translationKey | Type string | Description No Description Provided |
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter translationKey | Type string | Description No Description Provided |
Parameter args | Type Object[] | Description No Description Provided |
Casters
Result type | Is Implicit |
---|---|
Result type string | Is Implicit false |
Methods
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter component | Type MCTextComponent | Description No Description Provided |
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter text | Type string | Description No Description Provided |
Return Type: MCTextComponent
Return Type: MCTextComponent
Return Type: string
Return Type: string
Parameter | Type | Description |
---|---|---|
Parameter maxLen | Type int | Description No Description Provided |
Return Type: MCStyle
If this is a Translation Text Component, return the actual translation key used for localization. If this is not a Translation Text Component, returns an empty string.
Returns: the translation key or an empty string.
Return Type: string
Return Type: string
Return Type: MCTextComponent
Parameter | Type | Description |
---|---|---|
Parameter style | Type MCStyle | Description No Description Provided |
Operators
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name formattedText | Type string | Has Getter true | Has Setter false | Description No Description Provided |
Name siblings | Type stdlib.List<MCTextComponent> | Has Getter true | Has Setter false | Description No Description Provided |
Name style | Type MCStyle | Has Getter true | Has Setter false | Description No Description Provided |
Name translationKey | Type string | Has Getter true | Has Setter false | Description If this is a Translation Text Component, return the actual translation key used for localization. If this is not a Translation Text Component, returns an empty string. |
Name unformattedComponentText | Type string | Has Getter true | Has Setter false | Description No Description Provided |