Package io.papermc.paper.event.player
Class AbstractChatEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.AbstractChatEvent
- All Implemented Interfaces:
- Cancellable
- Direct Known Subclasses:
- AsyncChatEvent,- ChatEvent
An abstract implementation of a chat event, handling shared logic.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanGets the cancellation state of this event.message()Gets the user-supplied message.final voidSets the user-supplied message.Gets the original and unmodified user-supplied message.final @NotNull ChatRendererrenderer()Gets the chat renderer.final voidrenderer(@NotNull ChatRenderer renderer) Sets the chat renderer.final voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.final @NotNull SignedMessageGets the signed message.viewers()Gets a set ofaudiencesthat this chat message will be displayed to.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, getHandlers, isAsynchronous
- 
Method Details- 
viewersGets a set ofaudiencesthat this chat message will be displayed to.The set returned is not guaranteed to be mutable and may auto-populate on access. Any listener accessing the returned set should be aware that it may reduce performance for a lazy set implementation. Listeners should be aware that modifying the list may throw UnsupportedOperationExceptionif the event caller provides an unmodifiable set.- Returns:
- a set of audienceswho will receive the chat message
 
- 
rendererSets the chat renderer.- Parameters:
- renderer- the chat renderer
- Throws:
- NullPointerException- if- rendereris- null
 
- 
rendererGets the chat renderer.- Returns:
- the chat renderer
 
- 
messageGets the user-supplied message. The return value will reflect changes made usingmessage(Component).- Returns:
- the user-supplied message
 
- 
messageSets the user-supplied message.- Parameters:
- message- the user-supplied message
- Throws:
- NullPointerException- if- messageis- null
 
- 
originalMessageGets the original and unmodified user-supplied message. The return value will not reflect changes made usingmessage(Component).- Returns:
- the original user-supplied message
 
- 
signedMessageGets the signed message. Changes made in this event will not update the signed message.- Returns:
- the signed message
 
- 
isCancelledpublic final boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic final void setCancelled(boolean cancelled) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancelled- true if you wish to cancel this event
 
 
-