Interface IChatGui
This class handles interacting with the native chat UI.
Assembly: Dalamud.dll
public interface IChatGui : IDalamudService
Properties
LastLinkedItemId
Gets the ID of the last linked item.
uint LastLinkedItemId { get; }
LastLinkedItemFlags
Gets the flags of the last linked item.
byte LastLinkedItemFlags { get; }
RegisteredLinkHandlers
Gets the dictionary of Dalamud Link Handlers.
IReadOnlyDictionary<(string PluginName, uint CommandId), Action<uint, SeString>> RegisteredLinkHandlers { get; }
Methods
AddChatLinkHandler(uint, Action<uint, SeString>)
Register a chat link handler.
DalamudLinkPayload AddChatLinkHandler(uint commandId, Action<uint, SeString> commandAction)
Returns
Dalamud.Game.Text.SeStringHandling.Payloads.DalamudLinkPayload: Returns an SeString payload for the link.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | commandId | The ID of the command. |
System.Action<System.UInt32,Dalamud.Game.Text.SeStringHandling.SeString> | commandAction | The action to be executed. |
RemoveChatLinkHandler(uint)
Remove a chat link handler.
void RemoveChatLinkHandler(uint commandId)
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | commandId | The ID of the command. |
RemoveChatLinkHandler()
Removes all chat link handlers registered by the plugin.
void RemoveChatLinkHandler()
Print(XivChatEntry)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(XivChatEntry chat)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Text.XivChatEntry | chat | A message to send. |
Print(string, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(string message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
Print(SeString, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(SeString message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Text.SeStringHandling.SeString | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
PrintError(string, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void PrintError(string message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
PrintError(SeString, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void PrintError(SeString message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Text.SeStringHandling.SeString | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
Print(ReadOnlySpan<byte>, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(ReadOnlySpan<byte> message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
PrintError(ReadOnlySpan<byte>, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void PrintError(ReadOnlySpan<byte> message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | message | A message to send. |
System.String | messageTag | String to prepend message with "[messageTag] ". |
System.Nullable<System.UInt16> | tagColor | Color to display the message tag with. |
Events
ChatMessage
Event that will be fired when a chat message is sent to chat by the game.
event IChatGui.OnMessageDelegate ChatMessage
Event Type
Dalamud.Plugin.Services.IChatGui.OnMessageDelegate
CheckMessageHandled
Event that allows you to stop messages from appearing in chat by setting the isHandled parameter to true.
event IChatGui.OnCheckMessageHandledDelegate CheckMessageHandled
Event Type
Dalamud.Plugin.Services.IChatGui.OnCheckMessageHandledDelegate
ChatMessageHandled
Event that will be fired when a chat message is handled by Dalamud or a Plugin.
event IChatGui.OnMessageHandledDelegate ChatMessageHandled
Event Type
Dalamud.Plugin.Services.IChatGui.OnMessageHandledDelegate
ChatMessageUnhandled
Event that will be fired when a chat message is not handled by Dalamud or a Plugin.
event IChatGui.OnMessageUnhandledDelegate ChatMessageUnhandled