aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-08-12 21:14:53 +1000
committerGitHub <noreply@github.com>2024-08-12 21:14:53 +1000
commit5850777d33722a95ca49cf057f7308ca565d4c21 (patch)
treefbf465465887b86e87061555b16d09077a892ffc
parenta5112c0fe80ef77b15ff52651df45cb80e0ec803 (diff)
downloadnotenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.tar.gz
notenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.tar.bz2
notenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.zip
Fix Damage Indicator Style not working with special symbols (#1314)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java3
1 files changed, 2 insertions, 1 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 d8f7becd..87afab30 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
@@ -47,7 +47,8 @@ public class DamageCommas {
private static final char OVERLOAD_STAR = '\u272F';
private static final Pattern PATTERN_CRIT = Pattern.compile(
"\u00a7f" + STAR + "((?:\u00a7.\\d(?:§.,)?)+)\u00a7." + STAR + "(.*)");
- private static final Pattern PATTERN_NO_CRIT = Pattern.compile("(\u00a7.)([\\d+,]*)(.*)");
+ private static final String SPECIAL = "[⚔+✧❤♞☄✷ﬗ✯]*"; //Stolen from skytils
+ private static final Pattern PATTERN_NO_CRIT = Pattern.compile("(\u00a7.)([\\d+,]*)(.*)" + SPECIAL);
private static final Pattern OVERLOAD_PATTERN = Pattern.compile("(\u00a7.)" + OVERLOAD_STAR + "((?:\u00a7.[\\d,])+)(\u00a7.)" + OVERLOAD_STAR + "\u00a7r");
public static IChatComponent replaceName(EntityLivingBase entity) {