From a98927303854058ad2d7a0d8bb88265c54139614 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 21 Oct 2023 12:01:47 +0200 Subject: better repo error handling --- src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') 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 } -- cgit