Skip to content

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

TellrawPart.constructor

Properties

clickEvent?

optional clickEvent?: ClickEvent

Defined in: core/frontend/nodes/tellraw_part.ts:21

Inherited from

TellrawPart.clickEvent


hoverEvent?

optional hoverEvent?: HoverEvent

Defined in: core/frontend/nodes/tellraw_part.ts:22

Inherited from

TellrawPart.hoverEvent


style

readonly style: TextStyle = {}

Defined in: core/frontend/nodes/tellraw_part.ts:20

Accumulated styling; each fluent method writes one field here.

Inherited from

TellrawPart.style


text

readonly text: 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

TellrawPart.bold


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

TellrawPart.color


italic()

italic(value?): this

Defined in: core/frontend/nodes/tellraw_part.ts:38

Parameters

value?

boolean = true

Returns

this

Inherited from

TellrawPart.italic


obfuscated()

obfuscated(value?): this

Defined in: core/frontend/nodes/tellraw_part.ts:53

Parameters

value?

boolean = true

Returns

this

Inherited from

TellrawPart.obfuscated


onClick()

onClick(event): this

Defined in: core/frontend/nodes/tellraw_part.ts:59

Attach a click action (see the click helper).

Parameters

event

ClickEvent

Returns

this

Inherited from

TellrawPart.onClick


onHover()

onHover(event): this

Defined in: core/frontend/nodes/tellraw_part.ts:65

Attach a hover tooltip (see the hover helper).

Parameters

event

HoverEvent

Returns

this

Inherited from

TellrawPart.onHover


strikethrough()

strikethrough(value?): this

Defined in: core/frontend/nodes/tellraw_part.ts:48

Parameters

value?

boolean = true

Returns

this

Inherited from

TellrawPart.strikethrough


underlined()

underlined(value?): this

Defined in: core/frontend/nodes/tellraw_part.ts:43

Parameters

value?

boolean = true

Returns

this

Inherited from

TellrawPart.underlined

Released under the MIT License · Credits