Skip to content

SuggestionsBuilder

Namespace Mc.Scripting.Commands · Kind class (sealed)

public sealed class SuggestionsBuilder

Collects the suggestions of one argument.

Member Description
string Remaining { get; } The text typed so far for the argument.
public string Remaining { get; }

The text typed so far for the argument.

Member Description
void Suggest(int value) Offers an integer completion.
void Suggest(string text, string? tooltip = null) Offers a completion.
public void Suggest(int value)

Offers an integer completion.

Parameters

Name Type Description
value int The number.
public void Suggest(string text, string? tooltip = null)

Offers a completion. Like vanilla’s matchesSubStr, completions that do not match SuggestionsBuilder.Remaining are dropped: the typed text must be a case-insensitive prefix of the completion or of a part of it after a ., _ or /.

Parameters

Name Type Description
text string The word to insert.
tooltip string? = null Optional hover text shown next to it.