diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt index c1a7af289..7a97fca1d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt @@ -37,7 +37,7 @@ object HypixelBazaarFetcher { @SubscribeEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { - event.title("Bazaar Fetching") + event.title("Bazaar Data Fetcher from API") val data = listOf( "failedAttempts: $failedAttempts", @@ -119,13 +119,20 @@ object HypixelBazaarFetcher { e.printStackTrace() } else { nextFetchTime = SimpleTimeMark.now() + 15.minutes - ErrorManager.logErrorWithData( - e, - userMessage, - "fetchType" to fetchType, - "failedAttempts" to failedAttempts, - "rawResponse" to rawResponse, - ) + if (rawResponse == null || rawResponse.toString() == "{}") { + ChatUtils.chat( + "§cFailed loading Bazaar Price data!\n" + + "Please wait until the Hypixel API is sending correct data again! There is nothing else to do at the moment.", + ) + } else { + ErrorManager.logErrorWithData( + e, + userMessage, + "fetchType" to fetchType, + "failedAttempts" to failedAttempts, + "rawResponse" to rawResponse, + ) + } } } |