Fix local chat spy formatting (#6226)

Fixes #5828
This commit is contained in:
Josh Roy 2025-07-20 01:56:46 -07:00 committed by GitHub
parent 9ef4fc34c3
commit 0417624bda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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