Class PlayerChatSent
Invoked after a player sends a chat message.
[EventModel(EventSynchronizationContext.Pure)]
public class PlayerChatSent : PlayerEvent, IPlayerEvent, IActionLoggableEvent
- Inheritance
-
PlayerChatSent
- Implements
- Inherited Members
Properties
AllowRichText
If rich text should be allowed.
public required bool AllowRichText { get; init; }
Property Value
ChatMode
The broadcast mode.
public required EChatMode ChatMode { get; init; }
Property Value
- EChatMode
FormatHandler
Formats the message for a player.
public required Func<WarfarePlayer, bool, string?> FormatHandler { get; init; }
Property Value
IconUrlOverride
Custom icon to use instead of the player's profile picture.
public required string? IconUrlOverride { get; init; }
Property Value
Remarks
null = the sender's profile picture.
MessageColor
The color of the message.
public required Color MessageColor { get; init; }
Property Value
- Color
OriginalText
The original text the player sent.
public required string OriginalText { get; init; }
Property Value
PlayerName
The player's names to be formatted into the message for each player.
public required PlayerNames PlayerName { get; init; }
Property Value
Prefix
The text that will be sent in front of the message.
public required string Prefix { get; init; }
Property Value
Request
The original chat request.
public required PlayerChatRequested Request { get; set; }
Property Value
TargetPlayers
Getter for a list of all players the message should be sent to.
public required Func<PlayerChatRequested, IEnumerable<WarfarePlayer>> TargetPlayers { get; set; }
Property Value
Text
The text that will be sent to everyone else.
public required string Text { get; init; }
Property Value
WasReplicated
If the chat message was sent out instead of just being ignored.
public required bool WasReplicated { get; init; }
Property Value
Remarks
Note this is not the same as cancelling the event because PlayerChatSent is still dispatched.
Methods
GetActionLogEntry(IServiceProvider, ref ActionLogEntry[]?)
public ActionLogEntry GetActionLogEntry(IServiceProvider serviceProvider, ref ActionLogEntry[]? multipleEntries)
Parameters
serviceProviderIServiceProvidermultipleEntriesActionLogEntry[]