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<DalamudLinkPayload>> RegisteredLinkHandlers { get; }
Methods
AddChatLinkHandler(uint, Action<DalamudLinkPayload>)
Register a chat link handler.
DalamudLinkPayload AddChatLinkHandler(uint commandId, Action<DalamudLinkPayload> commandAction)
Returns
Dalamud.Game.Text.DalamudLinkPayload: Returns an SeString payload for the link.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | commandId | The ID of the command. |
System.Action<Dalamud.Game.Text.DalamudLinkPayload> | 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(IPrintableChatMessage)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(IPrintableChatMessage message)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Chat.IPrintableChatMessage | message | A message to send. |
Print(ReadOnlySeString, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(ReadOnlySeString message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeString | 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(ReadOnlySeStringSpan, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void Print(ReadOnlySeStringSpan message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeStringSpan | 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(ReadOnlySeString, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void PrintError(ReadOnlySeString message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeString | 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(ReadOnlySeStringSpan, string?, ushort?)
Queue a chat message. Dalamud will send queued messages on the next framework event.
void PrintError(ReadOnlySeStringSpan message, string? messageTag = null, ushort? tagColor = null)
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeStringSpan | 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
An event that will be fired when a chat message is sent to chat by the game.
event IChatGui.HandleableChatMessageDelegate ChatMessage
Event Type
Dalamud.Plugin.Services.IChatGui.HandleableChatMessageDelegate
CheckMessageHandled
A follow-up event after Dalamud.Plugin.Services.IChatGui.ChatMessage, that allows for final modifications, like translation or formatting.
It is only fired if the message was not suppressed during the Dalamud.Plugin.Services.IChatGui.ChatMessage event.
event IChatGui.HandleableChatMessageDelegate CheckMessageHandled
Event Type
Dalamud.Plugin.Services.IChatGui.HandleableChatMessageDelegate
ChatMessageHandled
Event that will be fired when a chat message is handled by Dalamud or a Plugin.
event IChatGui.ChatMessageDelegate ChatMessageHandled
Event Type
Dalamud.Plugin.Services.IChatGui.ChatMessageDelegate
ChatMessageUnhandled
Event that will be fired when a chat message is not handled by Dalamud or a Plugin.
event IChatGui.ChatMessageDelegate ChatMessageUnhandled
Event Type
Dalamud.Plugin.Services.IChatGui.ChatMessageDelegate
LogMessage
Event that will be fired when a log message, that is a chat message based on entries in the LogMessage sheet, is sent.
event IChatGui.LogMessageDelegate LogMessage