Table of Contents

Class PlayerChatSent

Namespace
Uncreated.Warfare.Events.Models.Players
Assembly
Uncreated.Warfare.dll

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

bool

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

Func<WarfarePlayer, bool, string>

IconUrlOverride

Custom icon to use instead of the player's profile picture.

public required string? IconUrlOverride { get; init; }

Property Value

string

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

string

PlayerName

The player's names to be formatted into the message for each player.

public required PlayerNames PlayerName { get; init; }

Property Value

PlayerNames

Prefix

The text that will be sent in front of the message.

public required string Prefix { get; init; }

Property Value

string

Request

The original chat request.

public required PlayerChatRequested Request { get; set; }

Property Value

PlayerChatRequested

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

Func<PlayerChatRequested, IEnumerable<WarfarePlayer>>

Text

The text that will be sent to everyone else.

public required string Text { get; init; }

Property Value

string

WasReplicated

If the chat message was sent out instead of just being ignored.

public required bool WasReplicated { get; init; }

Property Value

bool

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

serviceProvider IServiceProvider
multipleEntries ActionLogEntry[]

Returns

ActionLogEntry