fix: stack overflow in component parser when text content ends with §

This commit is contained in:
ChomeNS
2025-06-21 16:38:02 +07:00
parent 978653dcec
commit 60a2c568a0
2 changed files with 3 additions and 1 deletions

View File

@@ -1 +1 @@
3468
3471

View File

@@ -191,6 +191,8 @@ public class ComponentUtilities {
// adventure will just use the reset character, which makes the text white,
// and that's not what we want
.replace("§r", formatting)
// prevents stack overflow when the content ends with §
.replaceFirst("§+$", "")
);
// goofy code