summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-21 12:01:47 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-21 12:01:47 +0200
commita98927303854058ad2d7a0d8bb88265c54139614 (patch)
treeeae66388dfbc7e736fdc43a8d501edb457e61b5b /src/main/java/at/hannibal2/skyhanni/data
parent830fdb7022ac173b421daeddfbc7e67c0d9f891b (diff)
downloadskyhanni-a98927303854058ad2d7a0d8bb88265c54139614.tar.gz
skyhanni-a98927303854058ad2d7a0d8bb88265c54139614.tar.bz2
skyhanni-a98927303854058ad2d7a0d8bb88265c54139614.zip
better repo error handling
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
index df19aac2e..363cbfd7c 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
@@ -126,17 +126,19 @@ class RepoManager(private val configLocation: File) {
ErrorManager.resetCache()
Minecraft.getMinecraft().addScheduledTask {
error = false
- RepositoryReloadEvent(repoLocation, gson).postAndCatchAndBlock(true, true) {
- LorenzUtils.clickableChat(
- "§e[SkyHanni] Error with the repo detected, try /shupdaterepo to fix it!",
- "shupdaterepo"
- )
+ RepositoryReloadEvent(repoLocation, gson).postAndCatchAndBlock(ignoreErrorCache = true) {
error = true
}
comp.complete(null)
if (answerMessage.isNotEmpty() && !error) {
LorenzUtils.chat("§e[SkyHanni] §a$answerMessage")
}
+ if (error) {
+ LorenzUtils.clickableChat(
+ "§e[SkyHanni] Error with the repo detected, try /shupdaterepo to fix it!",
+ "shupdaterepo"
+ )
+ }
}
return comp
}