mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
Fix parsing bug in BaseComponent (wrong coloring)
This commit is contained in:
parent
419b3e4b02
commit
60da7c5f2b
5
pom.xml
5
pom.xml
@ -87,5 +87,10 @@
|
|||||||
<artifactId>commons-cli</artifactId>
|
<artifactId>commons-cli</artifactId>
|
||||||
<version>1.4</version>
|
<version>1.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jline</groupId>
|
||||||
|
<artifactId>jline</artifactId>
|
||||||
|
<version>3.17.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -50,7 +50,7 @@ public class BaseComponent extends ChatComponent {
|
|||||||
char nextFormattingChar = iterator.current();
|
char nextFormattingChar = iterator.current();
|
||||||
iterator.next();
|
iterator.next();
|
||||||
RGBColor nextColor = ChatColors.getColorByFormattingChar(nextFormattingChar);
|
RGBColor nextColor = ChatColors.getColorByFormattingChar(nextFormattingChar);
|
||||||
if (nextColor != null && nextColor != color) {
|
if (nextColor != null) {
|
||||||
// color change, add text part
|
// color change, add text part
|
||||||
if (currentText.length() > 0) {
|
if (currentText.length() > 0) {
|
||||||
parts.add(new TextComponent(currentText.toString(), color, formattingCodes));
|
parts.add(new TextComponent(currentText.toString(), color, formattingCodes));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user