Show / Hide Table of Contents

Class ChatCommand

Class holding information about chat command (built from ChatCommandAttribute and ChatSubCommandAttribute).

Inheritance
System.Object
ChatCommand
Namespace: Eco.Gameplay.Systems.Messaging.Chat.Commands
Assembly: Eco.Gameplay.dll
Syntax
public class ChatCommand : Object

Constructors

ChatCommand()

Declaration
public ChatCommand()

Fields

Attribute

Declaration
public ChatCommandAttribute Attribute
Field Value
Type Description
ChatCommandAttribute

HelpText

Declaration
public string HelpText
Field Value
Type Description
System.String

Key

Declaration
public string Key
Field Value
Type Description
System.String

Method

Declaration
public MethodInfo Method
Field Value
Type Description
System.Reflection.MethodInfo

Name

Declaration
public string Name
Field Value
Type Description
System.String

ParentKey

Declaration
public string ParentKey
Field Value
Type Description
System.String

ParentName

Declaration
public string ParentName
Field Value
Type Description
System.String

ShortCut

Declaration
public string ShortCut
Field Value
Type Description
System.String

Properties

AuthLevel

Declaration
public ChatAuthorizationLevel AuthLevel { get; }
Property Value
Type Description
ChatAuthorizationLevel

FullName

Returns fully qualified command name (including parent name if it is sub command).

Declaration
public string FullName { get; }
Property Value
Type Description
System.String

HasSubCommands

Declaration
public bool HasSubCommands { get; }
Property Value
Type Description
System.Boolean

SubCommands

Declaration
public IEnumerable<ChatCommand> SubCommands { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ChatCommand>

Methods

AddSubCommand(ChatCommand)

Declaration
public void AddSubCommand(ChatCommand subCommand)
Parameters
Type Name Description
ChatCommand subCommand

CommandRequiresUser()

Checks if this command requires a user object to be executed.

Declaration
public bool CommandRequiresUser()
Returns
Type Description
System.Boolean

True if the command requres a user

Matches(String)

Checks if ChatCommand matches searchString.

Declaration
public bool Matches(string searchString)
Parameters
Type Name Description
System.String searchString
Returns
Type Description
System.Boolean

TryGetSubCommand(String, out ChatCommand)

Declaration
public bool TryGetSubCommand(string nameOrKey, out ChatCommand command)
Parameters
Type Name Description
System.String nameOrKey
ChatCommand command
Returns
Type Description
System.Boolean

WithLanguage(SupportedLanguage)

Returns ChatCommand localized for language. It will only correctly work if original command is in English locale.

Declaration
public ChatCommand WithLanguage(SupportedLanguage language)
Parameters
Type Name Description
SupportedLanguage language
Returns
Type Description
ChatCommand

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾