aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
index a73320fc..aafcfb4d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
@@ -18,7 +18,7 @@ public class DamageCommas {
private static final WeakHashMap<EntityLivingBase, ChatComponentText> replacementMap = new WeakHashMap<>();
- private static final EnumChatFormatting[] colours = {EnumChatFormatting.RED, EnumChatFormatting.GOLD, EnumChatFormatting.YELLOW, EnumChatFormatting.WHITE};
+ private static final EnumChatFormatting[] coloursHypixel = {EnumChatFormatting.WHITE, EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD, EnumChatFormatting.RED, EnumChatFormatting.RED, EnumChatFormatting.WHITE};
private static final char STAR = '\u2727';
private static final Pattern PATTERN_CRIT = Pattern.compile("\u00a7f"+STAR+"((?:\u00a7.\\d)+)\u00a7."+STAR+"(.*)");
@@ -81,7 +81,11 @@ public class DamageCommas {
int colourIndex = 0;
for(char c : newFormatted.toString().toCharArray()) {
- newFormattedCrit.append(colours[colourIndex++ % colours.length]);
+ if(c == ',') {
+ newFormattedCrit.append(EnumChatFormatting.GRAY);
+ } else {
+ newFormattedCrit.append(coloursHypixel[colourIndex++ % coloursHypixel.length]);
+ }
newFormattedCrit.append(c);
}