Hey all, I’m relatively new to the Paper API and trying to get used to using Components instead of Strings.
I’m coding a minigame plugin that changes the format of chat messages to the following:
[Game/Spectator/Lobby Chat] [Prefix] Player Name » Message
In Minecraft, that would look something like this:
How would I do that with Paper API’s
AsyncChatEvent? I see from the Javadocs that there is a
#render method, but that doesn’t allow me to insert the chat prefix.
The prefix also changes depending on the player speaking, so spectators will have the
[Spectator Chat] prefix, players in the lobby will have the
[Lobby Chat] prefix, and so on.
Any ideas? Thanks!