Interface CarbonChatEvent
- All Superinterfaces:
Cancellable,CarbonEvent
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public interface CarbonChatEvent
extends CarbonEvent, Cancellable
Event that's called when chat components are rendered for online players.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionThe chat channel the message was sent in.message()Get the chat message that will be sent.voidSet the chat message that will be sent.Get the original message that was sent.The recipients of the message.Get the renderers used to construct components for each of the recipients.sender()Get the sender of the message.If the message is being previewed by the player.Methods inherited from interface net.draycia.carbon.api.event.Cancellable
cancelled, cancelled
-
Method Details
-
renderers
List<KeyedRenderer> renderers()Get the renderers used to construct components for each of the recipients. The returned list is mutable.- Returns:
- renderers
- Since:
- 2.0.0
-
signedMessage
@MonotonicNonNull SignedMessage signedMessage()If the message is being previewed by the player.- Returns:
- if the message is being previewed
- Since:
- 3.0.0
-
sender
CarbonPlayer sender()Get the sender of the message.- Returns:
- The message sender.
- Since:
- 2.0.0
-
originalMessage
Component originalMessage()Get the original message that was sent.- Returns:
- The original message.
- Since:
- 2.0.0
-
message
Component message()Get the chat message that will be sent.- Returns:
- The chat message.
- Since:
- 2.0.0
-
message
Set the chat message that will be sent.- Parameters:
message- new message- Since:
- 2.0.0
-
chatChannel
@MonotonicNonNull ChatChannel chatChannel()The chat channel the message was sent in.- Returns:
- the chat channel
- Since:
- 2.0.0
-
recipients
The recipients of the message. List is mutable and elements may be added/removed.- Returns:
- the recipients of the message. entries may be players, console, or other audience implementations
- Since:
- 2.0.0
-