From 1acc0fdbfd01595d8d2842bdf1c3b3669ae5c0b4 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:32:38 +0700 Subject: [PATCH] fix: 95% WORKING PARSER NOW YAY (styles still get stuck sometimes) --- build-number.txt | 2 +- .../me/chayapak1/chomens_bot/util/ComponentUtilities.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-number.txt b/build-number.txt index 0bfd2262..20888455 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -1386 \ No newline at end of file +1403 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java b/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java index a4434fdc..8dd5ec3d 100644 --- a/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java +++ b/src/main/java/me/chayapak1/chomens_bot/util/ComponentUtilities.java @@ -237,7 +237,7 @@ public class ComponentUtilities { final String result = lastStyle + color + style + originalResult + - resetCode; + (lastStyle.isEmpty() ? resetCode : ""); lastStyle = color + style; @@ -307,7 +307,7 @@ public class ComponentUtilities { .get(idx) .asComponent(), type - ) + color + style // IMPORTANT!!!! + ) + lastStyle + color + style // IMPORTANT!!!! ) ); } else {