Show / Hide Table of Contents

Interface IChatClient

The interface that something needs to implement in order to perform chat commands. Used by User and RCON currently. Chat commands can accept either a User or an IChatClient

Difference between using User vs. IChatClient as the first argument include:

  • If they accept a User, they are allowed to have full access to that User's interface, but those chat commands cant be called by headless clients like RCON
  • If they accept an IChatClient, they have a limited set of properties (below) which they can access from the chatClient, but both Users in game and headless clients such as RCON can call these functions.

Generally if you only need to issue return displays and make modifications to the world, you should make the chat command accept IChatClient, so headless clients like RCON can call it.

Namespace: Eco.Gameplay.Systems.Chat
Assembly: Eco.Gameplay.dll
Syntax
public interface IChatClient

Properties

ImplementationName

Represents the internal name of this implementation. Used in things suchas error messages

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

MarkedUpName

Represents the markup display name of this IChatClient instance

Declaration
LocString MarkedUpName { get; }
Property Value
Type Description
LocString

Name

Represents the display name of this IChatClient instance

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

Methods

Error(LocString)

Declaration
void Error(LocString msg)
Parameters
Type Name Description
LocString msg

ErrorLoc(FormattableString)

Sends a error message to the command invoker from a chat command

Declaration
void ErrorLoc(FormattableString msg)
Parameters
Type Name Description
System.FormattableString msg

ErrorLocStr(String)

Declaration
void ErrorLocStr(string msg)
Parameters
Type Name Description
System.String msg

GetChatAuthLevel()

Returns this Invoker's ChatAuthorizationLevel value for use in command permission checks

Declaration
ChatAuthorizationLevel GetChatAuthLevel()
Returns
Type Description
ChatAuthorizationLevel

ChatAuthorizationLevel if the Invoker

Msg(LocString, NotificationStyle)

Declaration
void Msg(LocString msg, NotificationStyle style)
Parameters
Type Name Description
LocString msg
NotificationStyle style

MsgLoc(FormattableString, NotificationStyle)

Sends a generic message to the command invoker from a chat command using the specified NotificationStyle style to determine how to display it for invokers that support it.

Declaration
void MsgLoc(FormattableString msg, NotificationStyle style)
Parameters
Type Name Description
System.FormattableString msg

Message to send to the invoker from a chat command

NotificationStyle style

NotificationStyle of the message to be sent

MsgLocStr(String, NotificationStyle)

Declaration
void MsgLocStr(string msg, NotificationStyle style)
Parameters
Type Name Description
System.String msg
NotificationStyle style

OkBox(LocString)

Declaration
void OkBox(LocString msg)
Parameters
Type Name Description
LocString msg

OkBoxLoc(FormattableString)

Displays an ok box to the client (or just a string if its a console)

Declaration
void OkBoxLoc(FormattableString msg)
Parameters
Type Name Description
System.FormattableString msg

OkBoxLocStr(String)

Declaration
void OkBoxLocStr(string msg)
Parameters
Type Name Description
System.String msg

TempServerMessage(LocString, NotificationCategory, NotificationStyle)

Sends a message to the command invoker that is intended to be temporary. This method may not be supported by all command invokers. If the method is not supported these messages should be routed to a normal MsgLocStr(String, NotificationStyle) message call.

Declaration
void TempServerMessage(LocString message, NotificationCategory category, NotificationStyle style)
Parameters
Type Name Description
LocString message

Message to send to the invoker from a chat command

NotificationCategory category

NotificationCategoryThe chat tags associated with this message

NotificationStyle style

NotificationStyle of the message to be sent

Extension Methods

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