Package io.papermc.paper.chat
Interface ChatRenderer
- All Known Subinterfaces:
- ChatRenderer.Default
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A chat renderer is responsible for rendering chat messages sent by 
Players to the server.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceSimilar toChatRenderer, but without knowledge of the message viewer.
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull ChatRendererCreate a new instance of the defaultChatRenderer.render(@NotNull Player source, @NotNull Component sourceDisplayName, @NotNull Component message, @NotNull Audience viewer) Renders a chat message.static @NotNull ChatRendererviewerUnaware(@NotNull ChatRenderer.ViewerUnaware renderer) Creates a new viewer-unawareChatRenderer, which will render the chat message a single time, displaying the same rendered message to every viewingAudience.
- 
Method Details- 
render@OverrideOnly @NotNull @NotNull Component render(@NotNull @NotNull Player source, @NotNull @NotNull Component sourceDisplayName, @NotNull @NotNull Component message, @NotNull @NotNull Audience viewer) Renders a chat message. This will be called once for each receivingAudience.- Parameters:
- source- the message source
- sourceDisplayName- the display name of the source player
- message- the chat message
- viewer- the receiving- Audience
- Returns:
- a rendered chat message
 
- 
defaultRendererCreate a new instance of the defaultChatRenderer.- Returns:
- a new ChatRenderer
 
- 
viewerUnaware@NotNull static @NotNull ChatRenderer viewerUnaware(@NotNull @NotNull ChatRenderer.ViewerUnaware renderer) Creates a new viewer-unawareChatRenderer, which will render the chat message a single time, displaying the same rendered message to every viewingAudience.- Parameters:
- renderer- the viewer unaware renderer
- Returns:
- a new ChatRenderer
 
 
-