aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/utils
diff options
context:
space:
mode:
authorKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2023-10-25 21:01:06 -0400
committerKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2023-10-25 21:01:06 -0400
commit1a737c461c0d861028612c0a2615d3f5c0487d74 (patch)
treec1a3e85715fc42b74a3b329299cc609b549a3904 /src/main/java/de/hysky/skyblocker/utils
parent6c8b6dfa0186c0a50f28562c718a237336b8dfb4 (diff)
downloadSkyblocker-1a737c461c0d861028612c0a2615d3f5c0487d74.tar.gz
Skyblocker-1a737c461c0d861028612c0a2615d3f5c0487d74.tar.bz2
Skyblocker-1a737c461c0d861028612c0a2615d3f5c0487d74.zip
Use profile id
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/utils')
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/Utils.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/Utils.java b/src/main/java/de/hysky/skyblocker/utils/Utils.java
index bbfd1101..f09d16ed 100644
--- a/src/main/java/de/hysky/skyblocker/utils/Utils.java
+++ b/src/main/java/de/hysky/skyblocker/utils/Utils.java
@@ -44,6 +44,8 @@ public class Utils {
@NotNull
private static String profile = "";
@NotNull
+ private static String profileId = "";
+ @NotNull
private static String server = "";
@NotNull
private static String gameType = "";
@@ -89,6 +91,11 @@ public class Utils {
return profile;
}
+ @NotNull
+ public static String getProfileId() {
+ return profileId;
+ }
+
/**
* @return the server parsed from /locraw.
*/
@@ -323,7 +330,7 @@ public class Utils {
}
/**
- * Parses the /locraw reply from the server
+ * Parses the /locraw reply from the server and updates the player's profile id
*
* @return not display the message in chat is the command is sent by the mod
*/
@@ -349,6 +356,11 @@ public class Utils {
return shouldFilter;
}
}
+
+ if (isOnSkyblock && message.startsWith("Profile ID: ")) {
+ profileId = message.replace("Profile ID: ", "");
+ }
+
return true;
}