Skip to content

Command

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

public static class Command

Entry point for building command trees: Command.Literal("home").Then(Command.Argument("name", Arg.Word()).Executes(...)).

Member Description
static CommandNode Argument(string name, ArgType type) A typed argument.
static CommandNode Literal(string name) A literal word.
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.

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.

ArgType · CommandNode