Skip to content

Class Formatting

Namespace: Void.Minecraft.Components.Text.Properties
Assembly: Void.Minecraft.dll

Describes optional visual formatting inherited or applied by a text component.

public record Formatting : IEquatable<Formatting>

Inheritance

objectFormatting

Implements

IEquatable<Formatting>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

Formatting(TextColor?, TextShadowColor?, string?, bool?, bool?, bool?, bool?, bool?)

Describes optional visual formatting inherited or applied by a text component.

public Formatting(TextColor? Color = null, TextShadowColor? ShadowColor = null, string? Font = null, bool? IsBold = null, bool? IsItalic = null, bool? IsUnderlined = null, bool? IsStrikethrough = null, bool? IsObfuscated = null)

Parameters

Color TextColor?

The foreground color, or null when unspecified.

ShadowColor TextShadowColor?

The shadow color, or null when unspecified.

Font string?

The font resource location, or null when unspecified.

IsBold bool?

Whether bold text is enabled, or null when unspecified.

IsItalic bool?

Whether italic text is enabled, or null when unspecified.

IsUnderlined bool?

Whether underlining is enabled, or null when unspecified.

IsStrikethrough bool?

Whether strikethrough is enabled, or null when unspecified.

IsObfuscated bool?

Whether obfuscated text is enabled, or null when unspecified.

Properties

Color

The foreground color, or null when unspecified.

public TextColor? Color { get; init; }

Property Value

TextColor?

Default

Gets formatting with every property unspecified.

public static Formatting Default { get; }

Property Value

Formatting

Font

The font resource location, or null when unspecified.

public string? Font { get; init; }

Property Value

string?

IsBold

Whether bold text is enabled, or null when unspecified.

public bool? IsBold { get; init; }

Property Value

bool?

IsItalic

Whether italic text is enabled, or null when unspecified.

public bool? IsItalic { get; init; }

Property Value

bool?

IsObfuscated

Whether obfuscated text is enabled, or null when unspecified.

public bool? IsObfuscated { get; init; }

Property Value

bool?

IsStrikethrough

Whether strikethrough is enabled, or null when unspecified.

public bool? IsStrikethrough { get; init; }

Property Value

bool?

IsUnderlined

Whether underlining is enabled, or null when unspecified.

public bool? IsUnderlined { get; init; }

Property Value

bool?

ShadowColor

The shadow color, or null when unspecified.

public TextShadowColor? ShadowColor { get; init; }

Property Value

TextShadowColor?