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.

  • Constructor Details

    • AsyncChatEvent

      @Internal public AsyncChatEvent(boolean async, Player player, Set<net.kyori.adventure.audience.Audience> viewers, ChatRenderer renderer, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component originalMessage, net.kyori.adventure.chat.SignedMessage signedMessage)
  • Method Details