Table of Contents

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

IReadOnlyList<string>

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

bool

Remarks

This is not propagated to sub-commands.

CommandName

Name of the command.

string CommandName { get; }

Property Value

string

Remarks

Example: 'home' for /home.

DefaultPermission

Default permission generated from the command name. Can be overridden with PermissionOverride.

PermissionLeaf DefaultPermission { get; }

Property Value

PermissionLeaf

Remarks

command.[command name]

HideFromHelp

If this command is hid from /help by a Uncreated.Warfare.Interaction.Commands.HideFromHelpAttribute.

bool HideFromHelp { get; }

Property Value

bool

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

int

IsExecutable

If the command can be executed. Some parent commands may not be executable.

bool IsExecutable { get; }

Property Value

bool

IsSubCommand

If this command has a parent command.

bool IsSubCommand { get; }

Property Value

bool

IsVanillaCommand

If this command represents a vanilla command (Type will be of type SDG.Unturned.Command).

bool IsVanillaCommand { get; }

Property Value

bool

Metadata

Information about how to display the command in /help.

ICommandParameterDescriptor Metadata { get; }

Property Value

ICommandParameterDescriptor

OtherPermissions

A list of other permissions the caller must have or could have instead (depending on OtherPermissionsAreAnd.

IReadOnlyList<PermissionLeaf> OtherPermissions { get; }

Property Value

IReadOnlyList<PermissionLeaf>

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

bool

ParentCommand

If this command is a sub-command, this is the info for the parent command.

ICommandDescriptor? ParentCommand { get; }

Property Value

ICommandDescriptor

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

ICommandDescriptor

SubCommands

List of all sub-commands for a command. These commands may also have sub-commands.

IReadOnlyList<ICommandDescriptor> SubCommands { get; }

Property Value

IReadOnlyList<ICommandDescriptor>

Type

Type that contains the code for the command.

Type Type { get; }

Property Value

Type