aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-23 10:42:46 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-23 10:42:46 +0200
commit8df9bd41947f91d2014156f345f8f21bd382682a (patch)
treee46fd6822f7ee6dfea6f5519d9790cc8cecca182 /src
parent5f517bbb4b70efc67da97d514164b2dd764d9aa3 (diff)
downloadskyhanni-8df9bd41947f91d2014156f345f8f21bd382682a.tar.gz
skyhanni-8df9bd41947f91d2014156f345f8f21bd382682a.tar.bz2
skyhanni-8df9bd41947f91d2014156f345f8f21bd382682a.zip
Better error handling if mod conflicts happen
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
index 5cc815437..d8c44b834 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.events.HypixelJoinEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.test.command.CopyErrorCommand
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -114,7 +115,12 @@ class FriendAPI {
val uuid = "/viewprofile (?<uuid>.*)".toPattern().matchMatcher(value) {
group("uuid")?.let {
- UUID.fromString(it)
+ try {
+ UUID.fromString(it)
+ } catch (e: IllegalArgumentException) {
+ CopyErrorCommand.logError(e, "Error reading friend list.")
+ return
+ }
}
}
val bestFriend = sibling.unformattedText.contains("§l")