From d99e3a6f916cc74aa0fdc525d7f54419029b8497 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:49:22 +0200 Subject: more exact error message --- .../at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt index bcf8e7811..b7c019475 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt @@ -148,7 +148,7 @@ object GardenCropSpeed { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { try { - val dicerJson = event.getConstant("DicerDrops")!! + val dicerJson = event.getConstant("DicerDrops") ?: error("DicerDrops not found in repo") calculateAverageDicer(melonDicer, dicerJson["MELON"].asJsonObject) calculateAverageDicer(pumpkinDicer, dicerJson["PUMPKIN"].asJsonObject) } catch (e: Exception) { -- cgit