Fix shout/local chat not sending with certain formats (#5719)

This commit is contained in:
Charles DeLancey 2024-02-29 18:32:51 -05:00 committed by GitHub
parent 622c8147a9
commit 993d7ede56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -218,7 +218,7 @@ public abstract class AbstractChatHandler {
// Strip local chat prefix to preserve API behaviour
final String localPrefix = AdventureUtil.miniToLegacy(tlLiteral("chatTypeLocal"));
String baseFormat = event.getFormat();
String baseFormat = AdventureUtil.legacyToMini(event.getFormat());
if (event.getFormat().startsWith(localPrefix)) {
baseFormat = baseFormat.substring(localPrefix.length());
}