Class SimpleMinecraftString<T, Color, U>

Type Parameters

  • T extends string

    String to apply effects on.

  • Color extends ColorObj = ColorObj

    Color object with RGB values.

  • U extends SegmentOptions<Color> = SegmentOptions<Color>

    Effects to apply.

Hierarchy

  • SimpleMinecraftString

Constructors

  • Construct a Minecraft string with basic formatting & options.

    Returns

    A new Minecraft string with the given formatting.

    Type Parameters

    • T extends string

    • Color extends ColorObj = ColorObj

    • U extends SegmentOptions<Color, TsegmentOptions<Color>, U> = SegmentOptions<Color, TsegmentOptions<Color>>

    Parameters

    • text: T

      The text to format.

    • options: U = ...

      The options to apply to the string.

    Returns SimpleMinecraftString<T, Color, U>

Properties

bold: U["bold"]
color: U["color"]
italic: U["italic"]
obfuscated: U["obfuscated"]
strikethrough: U["strikethrough"]
text: T

The text to format.

underlined: U["underlined"]

Methods

  • Export the Minecraft string as a JSON object.

    Returns

    The serialized version of this string.

    Type Parameters

    • T extends boolean = false

    Parameters

    • nbt: T

    Returns SimpleRawMCString<T, T>

Generated using TypeDoc