Interface ICommandDescriptor
- Namespace
- Uncreated.Warfare.Interaction.Commands.Syntax
- Assembly
- Uncreated.Warfare.dll
Defines information about a single command or sub-command.
public interface ICommandDescriptor
Properties
Aliases
Aliases for CommandName.
IReadOnlyList<string> Aliases { get; }
Property Value
AutoHelpDisabled
Typing '/command help' will not switch to /help if this is true, which can be set using the Uncreated.Warfare.Interaction.Commands.DisableAutoHelpAttribute.
bool AutoHelpDisabled { get; }
Property Value
Remarks
This is not propagated to sub-commands.
CommandName
Name of the command.
string CommandName { get; }
Property Value
Remarks
Example: 'home' for /home.
DefaultPermission
Default permission generated from the command name. Can be overridden with PermissionOverride.
PermissionLeaf DefaultPermission { get; }
Property Value
Remarks
command.[command name]
HideFromHelp
If this command is hid from /help by a Uncreated.Warfare.Interaction.Commands.HideFromHelpAttribute.
bool HideFromHelp { get; }
Property Value
HierarchyLevel
This command's position in it's family tree. 0 = parent command, 1 = child, 2 = child's child, etc.
int HierarchyLevel { get; }
Property Value
IsExecutable
If the command can be executed. Some parent commands may not be executable.
bool IsExecutable { get; }
Property Value
IsSubCommand
If this command has a parent command.
bool IsSubCommand { get; }
Property Value
IsVanillaCommand
If this command represents a vanilla command (Type will be of type SDG.Unturned.Command).
bool IsVanillaCommand { get; }
Property Value
Metadata
Information about how to display the command in /help.
ICommandParameterDescriptor Metadata { get; }
Property Value
OtherPermissions
A list of other permissions the caller must have or could have instead (depending on OtherPermissionsAreAnd.
IReadOnlyList<PermissionLeaf> OtherPermissions { get; }
Property Value
OtherPermissionsAreAnd
If OtherPermissions represents a list of permissions the user must have including DefaultPermission, instead of a list of alternative permissions the user could have.
bool OtherPermissionsAreAnd { get; }
Property Value
ParentCommand
If this command is a sub-command, this is the info for the parent command.
ICommandDescriptor? ParentCommand { get; }
Property Value
RedirectCommandInfo
The command that will automatically take over if this command is called. It should usually be a child command.
ICommandDescriptor? RedirectCommandInfo { get; }
Property Value
SubCommands
List of all sub-commands for a command. These commands may also have sub-commands.
IReadOnlyList<ICommandDescriptor> SubCommands { get; }
Property Value
Type
Type that contains the code for the command.
Type Type { get; }