Class CommandMetadata
- Namespace
- Uncreated.Warfare.Interaction.Commands
- Assembly
- Uncreated.Warfare.dll
Information about the layout of a command from a configuration file.
public class CommandMetadata : ICommandParameterDescriptor
- Inheritance
-
CommandMetadata
- Implements
- Inherited Members
Properties
Alias
Single value that can be entered instead of Name.
public string? Alias { get; set; }
Property Value
Aliases
Values that can be entered instead of Name.
public string[] Aliases { get; set; }
Property Value
- string[]
Chain
Number of sub-parameters to chain into one 'parameter' including this one. Requires that all child parameters up to that amount have only one parameter.
public int Chain { get; set; }
Property Value
Remarks
Example: /tp [x y z|location|player] where x.ChainDisplayAmount = 3.
Description
Translatable description of the command or sub-command.
public TranslationList? Description { get; set; }
Property Value
Flags
List of all valid flags.
public CommandMetadata.FlagMetadata[] Flags { get; set; }
Property Value
Name
Name of the parameter in proper-case format.
public string Name { get; set; }
Property Value
Optional
If the parameter is optional. All other parameters on this level must also be marked optional.
public bool Optional { get; set; }
Property Value
Parameters
List of sub-parameters.
public CommandMetadata[] Parameters { get; set; }
Property Value
Permission
The permission needed to execute the command.
public PermissionLeaf Permission { get; set; }
Property Value
Remainder
If the parameter spans the rest of the command arguments, including spaces.
public bool Remainder { get; set; }
Property Value
ResolvedTypes
Array of types after Clean(Type) is ran.
public Type[] ResolvedTypes { get; }
Property Value
- Type[]
Remarks
Verbatim parameter types will have the type of VerbatimParameterType.
Type
Value type, or 'Verbatim' if the parameter name itself should be entered.
public string? Type { get; set; }
Property Value
Remarks
Types can be fully qualified type names, namespace names in Uncreated.Warfare or mscorlib, language type keywords, or 'Verbatim'.
Types
Value type, or 'Verbatim' if the parameter name itself should be entered.
public string?[]? Types { get; set; }
Property Value
- string[]
Remarks
Types can be fully qualified type names, namespace names in Uncreated.Warfare or mscorlib, language type keywords, or 'Verbatim'.
Methods
Clean(Type)
Recursively clean this metadata and all it's parameters.
public void Clean(Type commandType)
Parameters
commandTypeTypeThe class of the parent command.