aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2022-08-26 13:24:35 +0200
committerGitHub <noreply@github.com>2022-08-26 21:24:35 +1000
commitdfd2f6b05bce74d7feb5d28e7a388dbb871ecf6a (patch)
tree001913c4f1dd391831da26e4398f75e6731c88e1 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parentc3845685bbb3a2a7fde25476eed0f788e038dc93 (diff)
downloadnotenoughupdates-dfd2f6b05bce74d7feb5d28e7a388dbb871ecf6a.tar.gz
notenoughupdates-dfd2f6b05bce74d7feb5d28e7a388dbb871ecf6a.tar.bz2
notenoughupdates-dfd2f6b05bce74d7feb5d28e7a388dbb871ecf6a.zip
Of course you have pronouns in pv (#234)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 5b3ea853..2267cbea 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -73,6 +73,7 @@ import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.math.BigInteger;
import java.nio.FloatBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
@@ -81,6 +82,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -1943,9 +1945,13 @@ public class Utils {
if (NotEnoughUpdates.INSTANCE.config.notifications.outdatedRepo) {
NotificationHandler.displayNotification(Lists.newArrayList(
EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "Missing repo data",
- EnumChatFormatting.RED + "Data used for many NEU features is not up to date, this should normally not be the case.",
- EnumChatFormatting.RED + "You can try " + EnumChatFormatting.BOLD + "/neuresetrepo" + EnumChatFormatting.RESET + EnumChatFormatting.RED +" and restart your game" +
- " to see if that fixes the issue.", EnumChatFormatting.RED + "If the problem persists please join " + EnumChatFormatting.BOLD + "discord.gg/moulberry" +
+ EnumChatFormatting.RED +
+ "Data used for many NEU features is not up to date, this should normally not be the case.",
+ EnumChatFormatting.RED + "You can try " + EnumChatFormatting.BOLD + "/neuresetrepo" + EnumChatFormatting.RESET +
+ EnumChatFormatting.RED + " and restart your game" +
+ " to see if that fixes the issue.",
+ EnumChatFormatting.RED + "If the problem persists please join " + EnumChatFormatting.BOLD +
+ "discord.gg/moulberry" +
EnumChatFormatting.RESET + EnumChatFormatting.RED + " and message in " + EnumChatFormatting.BOLD +
"#neu-support" + EnumChatFormatting.RESET + EnumChatFormatting.RED + " to get support"
),
@@ -1979,6 +1985,13 @@ public class Utils {
return -1;
}
+ public static UUID parseDashlessUUID(String dashlessUuid) {
+ // From: https://stackoverflow.com/a/30760478/
+ BigInteger most = new BigInteger(dashlessUuid.substring(0, 16), 16);
+ BigInteger least = new BigInteger(dashlessUuid.substring(16, 32), 16);
+ return new UUID(most.longValue(), least.longValue());
+ }
+
public static String getOpenChestName() {
return SBInfo.getInstance().currentlyOpenChestName;
}