Skip to main content
Version: 15.x (API 15) [Current]

Interface IChatGui

This class handles interacting with the native chat UI.

Assembly: Dalamud.dll​
Declaration
public interface IChatGui : IDalamudService

Properties​

LastLinkedItemId​

Gets the ID of the last linked item.

Declaration
uint LastLinkedItemId { get; }

LastLinkedItemFlags​

Gets the flags of the last linked item.

Declaration
byte LastLinkedItemFlags { get; }

RegisteredLinkHandlers​

Gets the dictionary of Dalamud Link Handlers.

Declaration
IReadOnlyDictionary<(string PluginName, uint CommandId), Action<uint, SeString>> RegisteredLinkHandlers { get; }

Methods​

AddChatLinkHandler(uint, Action<uint, SeString>)​

Register a chat link handler.

Declaration
DalamudLinkPayload AddChatLinkHandler(uint commandId, Action<uint, SeString> commandAction)
Returns​

Dalamud.Game.Text.SeStringHandling.Payloads.DalamudLinkPayload: Returns an SeString payload for the link.

Parameters​
TypeNameDescription
System.UInt32commandIdThe ID of the command.
System.Action<System.UInt32,Dalamud.Game.Text.SeStringHandling.SeString>commandActionThe action to be executed.

RemoveChatLinkHandler(uint)​

Remove a chat link handler.

Declaration
void RemoveChatLinkHandler(uint commandId)
Parameters​
TypeNameDescription
System.UInt32commandIdThe ID of the command.

RemoveChatLinkHandler()​

Removes all chat link handlers registered by the plugin.

Declaration
void RemoveChatLinkHandler()

Print(XivChatEntry)​

Queue a chat message. Dalamud will send queued messages on the next framework event.

Declaration
void Print(XivChatEntry chat)
Parameters​
TypeNameDescription
Dalamud.Game.Text.XivChatEntrychatA message to send.

Print(string, string?, ushort?)​

Queue a chat message. Dalamud will send queued messages on the next framework event.

Declaration
void Print(string message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
System.StringmessageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor to display the message tag with.

Print(SeString, string?, ushort?)​

Queue a chat message. Dalamud will send queued messages on the next framework event.

Declaration
void Print(SeString message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringmessageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor to display the message tag with.

PrintError(string, string?, ushort?)​

Queue a chat message. Dalamud will send queued messages on the next framework event.

Declaration
void PrintError(string message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
System.StringmessageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor to display the message tag with.

PrintError(SeString, string?, ushort?)​

Queue a chat message. Dalamud will send queued messages on the next framework event.

Declaration
void PrintError(SeString message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringmessageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor 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.

Declaration
void Print(ReadOnlySpan<byte> message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
System.ReadOnlySpan<System.Byte>messageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor 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.

Declaration
void PrintError(ReadOnlySpan<byte> message, string? messageTag = null, ushort? tagColor = null)
Parameters​
TypeNameDescription
System.ReadOnlySpan<System.Byte>messageA message to send.
System.StringmessageTagString to prepend message with "[messageTag] ".
System.Nullable<System.UInt16>tagColorColor 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.

Declaration
event IChatGui.OnHandleableChatMessageDelegate ChatMessage
Event Type​

Dalamud.Plugin.Services.IChatGui.OnHandleableChatMessageDelegate

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.

Declaration
event IChatGui.OnHandleableChatMessageDelegate CheckMessageHandled
Event Type​

Dalamud.Plugin.Services.IChatGui.OnHandleableChatMessageDelegate

ChatMessageHandled​

Event that will be fired when a chat message is handled by Dalamud or a Plugin.

Declaration
event IChatGui.OnChatMessageDelegate ChatMessageHandled
Event Type​

Dalamud.Plugin.Services.IChatGui.OnChatMessageDelegate

ChatMessageUnhandled​

Event that will be fired when a chat message is not handled by Dalamud or a Plugin.

Declaration
event IChatGui.OnChatMessageDelegate ChatMessageUnhandled
Event Type​

Dalamud.Plugin.Services.IChatGui.OnChatMessageDelegate

LogMessage​

Event that will be fired when a log message, that is a chat message based on entries in the LogMessage sheet, is sent.

Declaration
event IChatGui.OnLogMessageDelegate LogMessage
Event Type​

Dalamud.Plugin.Services.IChatGui.OnLogMessageDelegate