mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Move the chat renderer to a final class variable instead of initializing it every chat event
This commit is contained in:
parent
8202021f07
commit
15f0f5fe2d
@ -18,11 +18,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class ChatListener extends PlexListener
|
||||
{
|
||||
|
||||
private final PlexChatRenderer renderer = new PlexChatRenderer();
|
||||
|
||||
@EventHandler
|
||||
public void onChat(AsyncChatEvent event)
|
||||
{
|
||||
PlexPlayer plexPlayer = PlayerCache.getPlexPlayerMap().get(event.getPlayer().getUniqueId());
|
||||
PlexChatRenderer renderer = new PlexChatRenderer();
|
||||
|
||||
if (!plexPlayer.getPrefix().isEmpty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user