Skip to content

Class Suggestion

Namespace: Void.Minecraft.Commands.Brigadier.Suggestion
Assembly: Void.Minecraft.dll

public record Suggestion : IComparable<Suggestion>, IEquatable<Suggestion>

Inheritance

objectSuggestion

Derived

IntegerSuggestion

Implements

IComparable<Suggestion>, IEquatable<Suggestion>

Inherited Members

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

Constructors

Suggestion(StringRange, string, IMessage?)

public Suggestion(StringRange Range, string Text, IMessage? Tooltip = null)

Parameters

Range StringRange

Text string

Tooltip IMessage?

Properties

Range

public StringRange Range { get; init; }

Property Value

StringRange

Text

public string Text { get; init; }

Property Value

string

Tooltip

public IMessage? Tooltip { get; init; }

Property Value

IMessage?

Methods

Apply(string)

public string Apply(string source)

Parameters

source string

Returns

string

CompareTo(Suggestion?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Suggestion? other)

Parameters

other Suggestion?

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Expand(string, StringRange)

public Suggestion Expand(string source, StringRange range)

Parameters

source string

range StringRange

Returns

Suggestion