Interface PlayerChatEvent
- 
- All Superinterfaces:
- AudienceMessageEvent,- Cancellable,- Event,- MessageEvent
 
 public interface PlayerChatEvent extends AudienceMessageEvent, Cancellable Fired when theComponentbeing sent to aPlayerChatFormatterwas due to chatting.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<PlayerChatFormatter>chatFormatter()Gets the current formatter that this message will be sent through.Componentmessage()Gets the chat message.PlayerChatFormatteroriginalChatFormatter()Gets the original formatter that this message will be sent through.ComponentoriginalMessage()Gets the original chat message.voidsetChatFormatter(@Nullable PlayerChatFormatter router)Sets the formatter for this message to go trough.voidsetMessage(Component message)Sets the chat message.- 
Methods inherited from interface org.spongepowered.api.event.message.AudienceMessageEventaudience, filterAudience, originalAudience, setAudience
 - 
Methods inherited from interface org.spongepowered.api.event.CancellableisCancelled, setCancelled
 
- 
 
- 
- 
- 
Method Detail- 
originalChatFormatterPlayerChatFormatter originalChatFormatter() Gets the original formatter that this message will be sent through.- Returns:
- The original formatter used
 
 - 
chatFormatterOptional<PlayerChatFormatter> chatFormatter() Gets the current formatter that this message will be sent through.- Returns:
- The formatter the message in this event will be sent through
 
 - 
setChatFormattervoid setChatFormatter(@Nullable PlayerChatFormatter router) Sets the formatter for this message to go trough.If the target audience is a ForwardingAudiencethePlayerChatFormatterwill be applied to each of itsForwardingAudience.audiences()- Parameters:
- router- The router to set
 
 - 
originalMessageComponent originalMessage() Gets the original chat message.This message is the original chat message, without any formatting whatsoever. In Vanilla, this is equivalent to what a player typed into the chat box (no name prefix or other elements). - Specified by:
- originalMessagein interface- MessageEvent
- Returns:
- The original chat message
 
 - 
messageComponent message() Gets the chat message.- Specified by:
- messagein interface- MessageEvent
- Returns:
- The chat message
 
 - 
setMessagevoid setMessage(Component message) Sets the chat message.- Specified by:
- setMessagein interface- MessageEvent
- Parameters:
- message- The chat message
 
 
- 
 
-