Fix adventure error when using color in local chat

We were feeding legacy text into miniToLegacy which logs an annoying message in console
This commit is contained in:
JRoy 2025-01-23 22:50:42 -05:00 committed by Josh Roy
parent 22de3d8bab
commit b293f2328a

View File

@ -228,7 +228,7 @@ public abstract class AbstractChatHandler {
server.getPluginManager().callEvent(spyEvent);
if (!spyEvent.isCancelled()) {
final String legacyString = AdventureUtil.miniToLegacy(String.format(spyEvent.getFormat(), AdventureUtil.legacyToMini(user.getDisplayName()), AdventureUtil.escapeTags(spyEvent.getMessage())));
final String legacyString = AdventureUtil.miniToLegacy(String.format(spyEvent.getFormat(), AdventureUtil.legacyToMini(user.getDisplayName()), AdventureUtil.legacyToMini(AdventureUtil.escapeTags(spyEvent.getMessage()))));
for (final Player onlinePlayer : spyEvent.getRecipients()) {
onlinePlayer.sendMessage(legacyString);