Package io.papermc.paper.event.player
Class AsyncChatEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.AbstractChatEvent
io.papermc.paper.event.player.AsyncChatEvent
- All Implemented Interfaces:
Cancellable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionAsyncChatEvent
(boolean async, @NotNull Player player, @NotNull Set<Audience> viewers, @NotNull ChatRenderer renderer, @NotNull Component message, @NotNull Component originalMessage, @NotNull SignedMessage signedMessage) -
Method Summary
Methods inherited from class io.papermc.paper.event.player.AbstractChatEvent
isCancelled, message, message, originalMessage, renderer, renderer, setCancelled, signedMessage, viewers
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
asynchronous, callEvent, getEventName, isAsynchronous
-
Constructor Details
-
AsyncChatEvent
@Internal public AsyncChatEvent(boolean async, @NotNull @NotNull Player player, @NotNull @NotNull Set<Audience> viewers, @NotNull @NotNull ChatRenderer renderer, @NotNull @NotNull Component message, @NotNull @NotNull Component originalMessage, @NotNull @NotNull SignedMessage signedMessage) - Parameters:
viewers
- A mutable set of viewers
-
-
Method Details
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-