For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/ChatSendBeforeEvent.md.

Class: ChatSendBeforeEvent experimental

event

Beta

An event that fires as players enter chat messages.

Properties

cancel

cancel: boolean

Beta

Remarks

If set to true in a beforeChat event handler, this message is not broadcast out.


message

readonly message: string

Beta

Remarks

Message that is being broadcast.


sender

readonly sender: Player

Beta

Remarks

Player that sent the chat message.


targets?

optional targets?: Player[]

Beta

Remarks

Optional list of players that will receive this message. If defined, this message is directly targeted to one or more players (i.e., is not broadcast). This list can be modified to change the message recipients.

同领域相关