mirror of
https://github.com/CPTProgrammer/ChatPlus.git
synced 2026-08-04 10:06:40 +08:00
Fix: Single character chat text issue fixed.
This commit is contained in:
parent
f160ea6dc4
commit
02e3914d04
@ -39,6 +39,7 @@ public class TextStyleFormatter {
|
||||
String sourceLiteralText = translateInput(sourceRawText, sourcePlayer, formatsTable);
|
||||
|
||||
/* Debug
|
||||
sourcePlayer.sendSystemMessage(Component.literal(sourceRawText));
|
||||
sourcePlayer.sendSystemMessage(Component.literal(sourceLiteralText));
|
||||
for (int i : formatsTable.keySet()) {
|
||||
ArrayList<ChatFormat> formatsList = formatsTable.get(i);
|
||||
@ -120,7 +121,7 @@ public class TextStyleFormatter {
|
||||
|
||||
startIndex = i;
|
||||
}
|
||||
if (startIndex < sourceLiteralText.length() - 1) {
|
||||
if (startIndex < sourceLiteralText.length()) {
|
||||
finalText.append(composeChatComponent(
|
||||
sourceLiteralText.substring(startIndex, sourceLiteralText.length()),
|
||||
currentColor,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user