diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/HighlightMissingRepoItems.kt | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/HighlightMissingRepoItems.kt b/src/main/java/at/hannibal2/skyhanni/test/HighlightMissingRepoItems.kt index 00ea73570..28e657c1e 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/HighlightMissingRepoItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/HighlightMissingRepoItems.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.MultiFilter import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.RenderUtils.highlight +import at.hannibal2.skyhanni.utils.jsonobjects.MultiFilterJson import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.gui.inventory.GuiInventory @@ -53,8 +54,8 @@ class HighlightMissingRepoItems { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { - val ignoredItems = event.getConstant("IgnoredItems") - ignoreItems.load(ignoredItems.asJsonObject) + val ignoredItems = event.getConstant<MultiFilterJson>("IgnoredItems") + ignoreItems.load(ignoredItems) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt index 84b180cd8..adf8d2637 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt @@ -58,8 +58,8 @@ object ErrorManager { fun logError(throwable: Throwable, message: String, ignoreErrorCache: Boolean) { val error = Error(message, throwable) - Minecraft.getMinecraft().thePlayer ?: throw error error.printStackTrace() + Minecraft.getMinecraft().thePlayer ?: return if (!ignoreErrorCache) { val pair = if (throwable.stackTrace.isNotEmpty()) { |