Class PlayerChatRequested
Invoked when a player tries to send a chat message.
[EventModel(EventSynchronizationContext.PerPlayer)]
public class PlayerChatRequested : CancellablePlayerEvent, IPlayerEvent, ICancellable
- Inheritance
-
PlayerChatRequested
- Implements
- Inherited Members
Properties
AllowRichText
If rich text should be allowed.
public required bool AllowRichText { get; set; }
Property Value
ChatMode
The broadcast mode.
public required EChatMode ChatMode { get; set; }
Property Value
- EChatMode
Exceptions
HasAdminChatPermissions
If the caller has permission to bypass checks for chat.
public required bool HasAdminChatPermissions { get; init; }
Property Value
IconUrlOverride
Custom icon to use instead of the player's profile picture.
public required string? IconUrlOverride { get; set; }
Property Value
Remarks
null = the sender's profile picture.
IsUnityMessage
If the message came from an event hook.
public required bool IsUnityMessage { get; init; }
Property Value
MessageColor
The color of the message.
public required Color MessageColor { get; set; }
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; set; }
Property Value
Prefix
The text that will be sent in front of the message.
public required string Prefix { get; set; }
Property Value
ShouldReplicate
If the chat message should be sent out instead of just ignored.
public required bool ShouldReplicate { get; set; }
Property Value
Remarks
Note this is not the same as cancelling the event because PlayerChatSent will still get dispatched.
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; set; }