Table of Contents

Class CommandInfo

Namespace
Uncreated.Warfare.Interaction.Commands
Assembly
Uncreated.Warfare.dll
public class CommandInfo : ICommandDescriptor
Inheritance
CommandInfo
Implements
Inherited Members

Properties

Aliases

Aliases for CommandName.

public string[] Aliases { get; }

Property Value

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.

public bool AutoHelpDisabled { get; }

Property Value

bool

Remarks

This is not propagated to sub-commands.

CommandName

Name of the command.

public string CommandName { get; }

Property Value

string

Remarks

Example: 'home' for /home.

CompositeName

Name of the command and all it's parent commands, if applicable. Names with white space will be wrapped in quotation marks.

public string CompositeName { get; }

Property Value

string

Remarks

Example: 'kit layout reset' for /kit layout reset.

DefaultPermission

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

public 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.

public bool HideFromHelp { get; set; }

Property Value

bool

HierarchyLevel

This command's position in it's family tree. 0 = parent command, 1 = child, 2 = child's child, etc.

public int HierarchyLevel { get; }

Property Value

int

IsExecutable

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

public bool IsExecutable { get; }

Property Value

bool

IsSubCommand

If this command has a parent command.

public bool IsSubCommand { get; }

Property Value

bool

Metadata

Information about how to display the command in /help.

public CommandMetadata Metadata { get; }

Property Value

CommandMetadata

OtherPermissions

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

public PermissionLeaf[] OtherPermissions { get; }

Property Value

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.

public bool OtherPermissionsAreAnd { get; }

Property Value

bool

ParentCommand

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

[JsonIgnore]
public CommandInfo? ParentCommand { get; }

Property Value

CommandInfo

Priority

Higher numbers will be executed over lower numbers.

public int Priority { get; }

Property Value

int

RedirectCommandInfo

The command that will automatically take over if this command is called. It should usually be a child command.

[JsonIgnore]
public CommandInfo? RedirectCommandInfo { get; set; }

Property Value

CommandInfo

SubCommands

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

public IReadOnlyList<CommandInfo> SubCommands { get; }

Property Value

IReadOnlyList<CommandInfo>

SynchronizedSemaphore

Commands marked as synchronized with the SynchronizedCommandAttribute all use this semaphore to synchronize their execution.

[JsonIgnore]
public SemaphoreSlim? SynchronizedSemaphore { get; }

Property Value

SemaphoreSlim

Remarks

Sub-commands share this with their parents but not with their siblings unless the parent defines it.

Type

Type that contains the code for the command.

[JsonIgnore]
public Type Type { get; }

Property Value

Type

VanillaCommand

Optional reference to the vanilla SDG.Unturned.Command.

[JsonIgnore]
public Command? VanillaCommand { get; }

Property Value

Command