SuggestionsBuilder
Namespace Mc.Scripting.Commands · Kind class (sealed)
public sealed class SuggestionsBuilderCollects the suggestions of one argument.
Properties
Section titled “Properties”| Member | Description |
|---|---|
string Remaining { get; } |
The text typed so far for the argument. |
Remaining
Section titled “Remaining”public string Remaining { get; }The text typed so far for the argument.
Methods
Section titled “Methods”| Member | Description |
|---|---|
void Suggest(int value) |
Offers an integer completion. |
void Suggest(string text, string? tooltip = null) |
Offers a completion. |
Suggest
Section titled “Suggest”public void Suggest(int value)Offers an integer completion.
Parameters
| Name | Type | Description |
|---|---|---|
value |
int |
The number. |
Suggest
Section titled “Suggest”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. |