Command
Namespace Mc.Scripting.Commands · Kind class (static)
public static class CommandEntry point for building command trees: Command.Literal("home").Then(Command.Argument("name", Arg.Word()).Executes(...)).
Methods
Section titled “Methods”| Member | Description |
|---|---|
static CommandNode Argument(string name, ArgType type) |
A typed argument. |
static CommandNode Literal(string name) |
A literal word. |
Argument
Section titled “Argument”public static CommandNode Argument(string name, ArgType type)A typed argument.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The argument name used to read it in the executor. |
type |
ArgType |
What is accepted (see Arg). |
Returns CommandNode: The node.
Literal
Section titled “Literal”public static CommandNode Literal(string name)A literal word.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The word (lower case, no spaces). |
Returns CommandNode: The node.