@FunctionalInterface public interface ChatRenderer
Player
s to the server.Modifier and Type | Interface and Description |
---|---|
static interface |
ChatRenderer.ViewerUnaware
Similar to
ChatRenderer , but without knowledge of the message viewer. |
Modifier and Type | Method and Description |
---|---|
static @NotNull ChatRenderer |
defaultRenderer()
Create a new instance of the default
ChatRenderer . |
@NotNull net.kyori.adventure.text.Component |
render(@NotNull Player source,
@NotNull net.kyori.adventure.text.Component sourceDisplayName,
@NotNull net.kyori.adventure.text.Component message,
@NotNull net.kyori.adventure.audience.Audience viewer)
Renders a chat message.
|
static @NotNull ChatRenderer |
viewerUnaware(@NotNull ChatRenderer.ViewerUnaware renderer)
Creates a new viewer-unaware
ChatRenderer , which will render the chat message a single time,
displaying the same rendered message to every viewing Audience . |
@NotNull @NotNull net.kyori.adventure.text.Component render(@NotNull @NotNull Player source, @NotNull @NotNull net.kyori.adventure.text.Component sourceDisplayName, @NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull net.kyori.adventure.audience.Audience viewer)
Audience
.source
- the message sourcesourceDisplayName
- the display name of the source playermessage
- the chat messageviewer
- the receiving Audience
@NotNull static @NotNull ChatRenderer defaultRenderer()
ChatRenderer
.ChatRenderer
@NotNull static @NotNull ChatRenderer viewerUnaware(@NotNull @NotNull ChatRenderer.ViewerUnaware renderer)
ChatRenderer
, which will render the chat message a single time,
displaying the same rendered message to every viewing Audience
.renderer
- the viewer unaware rendererChatRenderer
Copyright © 2021. All rights reserved.