aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-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")