Skip to content

API reference Obsidian.API.Events

IncomingChatMessageEventArgs class

public class IncomingChatMessageEventArgs : PlayerEventArgs, ICancellable

In Obsidian.API.

Constructors

IncomingChatMessageEventArgs(IPlayer, IServer, string, string)

public IncomingChatMessageEventArgs(IPlayer player, IServer server, string message, string format);

Initializes a new instance of the IncomingChatMessageEventArgs class.

Parameters

player
The player which sent the message.
message
The message which was sent.
format
Any formatting appied to the message.
server
The server this took place in.

Properties

Format

public string Format { get; set; }

The message format.

IsCancelled

public bool IsCancelled { get; }

Gets a value indicating whether the default behaviour should be cancelled.

Message

public string Message { get; set; }

The message that was sent.

Methods

Cancel()

public void Cancel();

Sets a flag which prevents default (vanilla) behavior from executing.

Remarks

This flag only affects vanilla behavior. If you wish to prevent other handlers from running, see AsyncEventArgs.Handled.

On this page