Skip to content

Commit

Permalink
debork text reformatting a little
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 24, 2020
1 parent 8f94e15 commit fc34a6c
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -5,7 +5,6 @@
import com.denizenscript.denizen.objects.EntityTag;
import com.denizenscript.denizen.objects.ItemTag;
import com.denizenscript.denizencore.utilities.CoreUtilities;
import com.sun.org.apache.regexp.internal.RE;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.*;

Expand Down Expand Up @@ -147,12 +146,17 @@ else if (component instanceof ScoreComponent) {
}
builder.append(RESET);
String output = builder.toString();
while (output.contains(RESET + WHITE)) {
output = output.replace(RESET + WHITE, RESET);
}
while (output.contains(RESET + RESET)) {
output = output.replace(RESET + RESET, RESET);
}
return output;
}

public static final String WHITE = ChatColor.WHITE.toString();

public static final String RESET = ChatColor.RESET.toString();

public static TextComponent copyFormatToNewText(TextComponent last) {
Expand Down

0 comments on commit fc34a6c

Please sign in to comment.