Appearance
helix / Text
Class: Text
Defined in: core/frontend/nodes/text.ts:3
Extends
Constructors
Constructor
new Text(
text):Text
Defined in: core/frontend/nodes/text.ts:4
Parameters
text
string
Returns
Text
Overrides
Properties
clickEvent?
optionalclickEvent?:ClickEvent
Defined in: core/frontend/nodes/tellraw_part.ts:21
Inherited from
hoverEvent?
optionalhoverEvent?:HoverEvent
Defined in: core/frontend/nodes/tellraw_part.ts:22
Inherited from
style
readonlystyle:TextStyle={}
Defined in: core/frontend/nodes/tellraw_part.ts:20
Accumulated styling; each fluent method writes one field here.
Inherited from
text
readonlytext:string
Defined in: core/frontend/nodes/text.ts:4
Methods
bold()
bold(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:33
Parameters
value?
boolean = true
Returns
this
Inherited from
color()
color(
color):this
Defined in: core/frontend/nodes/tellraw_part.ts:28
Colour this span. Prefer the typed Color.GOLD; a raw #RRGGBB hex string is also accepted for custom colours.
Parameters
color
Color | `#${string}`
Returns
this
Inherited from
italic()
italic(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:38
Parameters
value?
boolean = true
Returns
this
Inherited from
obfuscated()
obfuscated(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:53
Parameters
value?
boolean = true
Returns
this
Inherited from
onClick()
onClick(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:59
Attach a click action (see the click helper).
Parameters
event
Returns
this
Inherited from
onHover()
onHover(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:65
Attach a hover tooltip (see the hover helper).
Parameters
event
Returns
this
Inherited from
strikethrough()
strikethrough(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:48
Parameters
value?
boolean = true
Returns
this
Inherited from
underlined()
underlined(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:43
Parameters
value?
boolean = true
Returns
this