Show / Hide Table of Contents

Class ChatCommandService

Service responsible for ChatCommand registration and processing.

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

Constructors

ChatCommandService()

Declaration
public ChatCommandService()

Methods

AddCommandHandlers(IEnumerable<Type>)

Collects all chat commands for handlerTypes and registers them in Eco.Gameplay.Systems.Messaging.Chat.Commands.ChatCommandService.commandsByLanguage dictionary for English language.

Declaration
public void AddCommandHandlers(IEnumerable<Type> handlerTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> handlerTypes

GetAllCommands()

Returns all registered commands (including sub commands).

Declaration
public IEnumerable<ChatCommand> GetAllCommands()
Returns
Type Description
System.Collections.Generic.IEnumerable<ChatCommand>

GetAllHeadlessCommands()

Returns all registered commands (including sub commands) that can be used by a headless IChatClient such as RCON.

Declaration
public IEnumerable<ChatCommand> GetAllHeadlessCommands()
Returns
Type Description
System.Collections.Generic.IEnumerable<ChatCommand>

HandleCommand(IChatClient, String, SupportedLanguage, INetObject)

Declaration
public bool HandleCommand(IChatClient chatClient, string text, SupportedLanguage language, INetObject target)
Parameters
Type Name Description
IChatClient chatClient
System.String text
SupportedLanguage language
INetObject target
Returns
Type Description
System.Boolean

HandleCommandAsync(IChatClient, String, SupportedLanguage, INetObject)

Declaration
public Task<bool> HandleCommandAsync(IChatClient chatClient, string text, SupportedLanguage language, INetObject target)
Parameters
Type Name Description
IChatClient chatClient
System.String text
SupportedLanguage language
INetObject target
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

ShowHelp(IChatClient, ChatCommand)

Shows help for command.

Declaration
public void ShowHelp(IChatClient chatClient, ChatCommand command)
Parameters
Type Name Description
IChatClient chatClient
ChatCommand command

ShowHelpByQuery(IChatClient, SupportedLanguage, String, Boolean)

Shows help for query. It depends on query content:

If full is set then will expand sub commands for all commands.

Declaration
public void ShowHelpByQuery(IChatClient chatClient, SupportedLanguage language, string query, bool full = false)
Parameters
Type Name Description
IChatClient chatClient
SupportedLanguage language
System.String query
System.Boolean full

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
☀
☾