aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-09-19 23:05:05 +0200
committerDoKM <mcazzyman@gmail.com>2021-09-19 23:05:05 +0200
commit54749d3855cfa5202e5d15363b44c7f4f121c4cf (patch)
treecf1aa61ec9c6bace1a8f22bb37c544d33e9b70b5 /src/main/java/io
parent2131cedf60e9dfcc5016141af8c936d3f627900c (diff)
downloadNotEnoughUpdates-54749d3855cfa5202e5d15363b44c7f4f121c4cf.tar.gz
NotEnoughUpdates-54749d3855cfa5202e5d15363b44c7f4f121c4cf.tar.bz2
NotEnoughUpdates-54749d3855cfa5202e5d15363b44c7f4f121c4cf.zip
Change neu's crit commas to represent hypixel's crits
Diffstat (limited to 'src/main/java/io')
-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);
}