Class ChatCommandService
Service responsible for ChatCommand registration and processing.
Inheritance
System.Object
ChatCommandService
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
Returns
Type |
Description |
System.Boolean |
|
HandleCommandAsync(IChatClient, String, SupportedLanguage, INetObject)
Declaration
public Task<bool> HandleCommandAsync(IChatClient chatClient, string text, SupportedLanguage language, INetObject target)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
ShowHelp(IChatClient, ChatCommand)
Declaration
public void ShowHelp(IChatClient chatClient, ChatCommand command)
Parameters
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
Extension Methods