mcutils
Toggle table of contents
common
Target filter
common
Switch theme
Search in API
Skip to content
mcutils
color
/
tech.aliorpse.mcutils.entity
/
TextComponent
Text
Component
@
Serializable
data
class
TextComponent
(
val
text
:
String
,
val
color
:
String
=
""
,
val
styles
:
Set
<
TextStyle
>
=
emptySet()
,
val
extra
:
List
<
TextComponent
>
=
emptyList()
)
Colored minecraft text representation.
Members
Members & Extensions
Constructors
Text
Component
Link copied to clipboard
constructor
(
text
:
String
,
color
:
String
=
""
,
styles
:
Set
<
TextStyle
>
=
emptySet()
,
extra
:
List
<
TextComponent
>
=
emptyList()
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
color
Link copied to clipboard
val
color
:
String
Hex color code.
extra
Link copied to clipboard
val
extra
:
List
<
TextComponent
>
Child components.
styles
Link copied to clipboard
val
styles
:
Set
<
TextStyle
>
Text styles.
text
Link copied to clipboard
val
text
:
String
Raw text.
Functions
to
Html
Link copied to clipboard
fun
TextComponent
.
toHtml
(
)
:
String
to
Plain
Text
Link copied to clipboard
fun
TextComponent
.
toPlainText
(
)
:
String