From cc508eabe25cdec3af5b808da171b37e2a87268c Mon Sep 17 00:00:00 2001 From: Aust1n46 Date: Sun, 1 Aug 2021 17:43:49 -0400 Subject: [PATCH] Fix color codes not properly propagating for chat color = 'None' option. --- TODO.txt | 1 + pom.xml | 2 +- .../java/mineverse/Aust1n46/chat/listeners/ChatListener.java | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO.txt b/TODO.txt index 6dc0091..f497b11 100644 --- a/TODO.txt +++ b/TODO.txt @@ -71,6 +71,7 @@ Add config option to disable chat logging in the console Make filters not case insensitive Update filter system +Add option to disable filters without having to remove them all Add GUI for /channel to join channels Add configurable channel icon block/item diff --git a/pom.xml b/pom.xml index 1f82580..dd83a18 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 mineverse.Aus1n46.chat VentureChat - 3.0.1 + 3.0.2 https://bitbucket.org/Aust1n46/venturechat/src/master https://bitbucket.org/Aust1n46/venturechat/src/master diff --git a/src/main/java/mineverse/Aust1n46/chat/listeners/ChatListener.java b/src/main/java/mineverse/Aust1n46/chat/listeners/ChatListener.java index 0f137cf..163b08d 100644 --- a/src/main/java/mineverse/Aust1n46/chat/listeners/ChatListener.java +++ b/src/main/java/mineverse/Aust1n46/chat/listeners/ChatListener.java @@ -475,7 +475,8 @@ public class ChatListener implements Listener { chat = " " + chat; } if(curColor.equalsIgnoreCase("None")) { - chat = Format.getLastCode(format) + chat; + // Format the placeholders and their color codes to determine the last color code to use for the chat message color + chat = Format.getLastCode(Format.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(mcp.getPlayer(), format))) + chat; } else { chat = curColor + chat;