Class CommandDefinitionBase
Shared command metadata; child interfaces define execution semantics.
public abstract class CommandDefinitionBase : ICommand
- Inheritance
-
CommandDefinitionBase
- Implements
- Derived
- Inherited Members
Constructors
CommandDefinitionBase(string, string, params string[])
protected CommandDefinitionBase(string name, string description, params string[] aliases)
Parameters
Properties
Aliases
public IReadOnlyList<string> Aliases { get; }
Property Value
Arguments
public IReadOnlyList<CommandArg> Arguments { get; }
Property Value
DefaultPermission
Fallback permission result when no explicit user/group node matches.
public virtual bool DefaultPermission { get; }
Property Value
Description
public string Description { get; }
Property Value
Name
public string Name { get; }
Property Value
Permission
Permission node required to run the command, e.g. hytale.command.stop.
public virtual string Permission { get; }
Property Value
Usage
Argument syntax shown in help/usage errors, e.g. "<player> [amount]".
public virtual string Usage { get; }
Property Value
Methods
WithDefaultArg<T>(string, CommandArgumentParser<T>, T, string?)
protected DefaultArg<T> WithDefaultArg<T>(string name, CommandArgumentParser<T> parser, T defaultValue, string? description = null)
Parameters
namestringparserCommandArgumentParser<T>defaultValueTdescriptionstring
Returns
- DefaultArg<T>
Type Parameters
T
WithFlagArg(string, string?, params string[])
protected FlagArg WithFlagArg(string name, string? description, params string[] aliases)
Parameters
Returns
WithFlagArg(string, params string[])
protected FlagArg WithFlagArg(string name, params string[] aliases)
Parameters
Returns
WithOptionalArg<T>(string, CommandArgumentParser<T>, string?)
protected OptionalArg<T> WithOptionalArg<T>(string name, CommandArgumentParser<T> parser, string? description = null)
Parameters
namestringparserCommandArgumentParser<T>descriptionstring
Returns
- OptionalArg<T>
Type Parameters
T
WithRequiredArg<T>(string, CommandArgumentParser<T>, string?)
protected RequiredArg<T> WithRequiredArg<T>(string name, CommandArgumentParser<T> parser, string? description = null)
Parameters
namestringparserCommandArgumentParser<T>descriptionstring
Returns
- RequiredArg<T>
Type Parameters
T