Class AsyncChatEvent

All Implemented Interfaces:
Cancellable

@NullMarked public final class AsyncChatEvent extends AbstractChatEvent
An event fired when a Player sends a chat message to the server.

This event will sometimes fire synchronously, depending on how it was triggered.

If a player is the direct cause of this event by an incoming packet, this event will be asynchronous. If a plugin triggers this event by compelling a player to chat, this event will be synchronous.

Care should be taken to check Event.isAsynchronous() and treat the event appropriately.