diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 14:28:14 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 14:28:14 +0200 |
commit | 1fb1be3ea1e6e805f16ab09f5a0d88651c8976c1 (patch) | |
tree | 1a85faf46be87744f54c613e43426f4a30b241ea /src/main/java/at/hannibal2/skyhanni/events | |
parent | 2d920a7f83fd700cc2b0d9bfda387e66c683f885 (diff) | |
download | skyhanni-1fb1be3ea1e6e805f16ab09f5a0d88651c8976c1.tar.gz skyhanni-1fb1be3ea1e6e805f16ab09f5a0d88651c8976c1.tar.bz2 skyhanni-1fb1be3ea1e6e805f16ab09f5a0d88651c8976c1.zip |
fixed migration problems with different versions and added edge case supports
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt index a4d24e0dc..62376c698 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt @@ -12,7 +12,7 @@ abstract class LorenzEvent : Event() { fun postAndCatch(): Boolean { return runCatching { - MinecraftForge.EVENT_BUS.post(this) + postWithoutCatch() }.onFailure { CopyErrorCommand.logError( it, @@ -20,4 +20,6 @@ abstract class LorenzEvent : Event() { ) }.getOrDefault(isCanceled) } + + fun postWithoutCatch() = MinecraftForge.EVENT_BUS.post(this) }
\ No newline at end of file |