diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-22 09:20:18 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-22 09:20:18 +0200 |
| commit | c52a71ee63c633d17d7a935c0aa92ddda904c750 (patch) | |
| tree | ebe8ee09960c0b3470fbb0042ada56582c315142 /src/main/java/at/hannibal2/skyhanni/test | |
| parent | bdb1fedeaed3c13dd8d86217459c25ab8175718f (diff) | |
| download | skyhanni-c52a71ee63c633d17d7a935c0aa92ddda904c750.tar.gz skyhanni-c52a71ee63c633d17d7a935c0aa92ddda904c750.tar.bz2 skyhanni-c52a71ee63c633d17d7a935c0aa92ddda904c750.zip | |
do not use Supplier
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt b/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt index 447a6f5aa..94894507c 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupport.kt @@ -1,16 +1,12 @@ package at.hannibal2.skyhanni.test.hotswap -import java.util.function.Supplier - object HotswapSupport { private val isForgeSidePresent = runCatching { Class.forName("moe.nea.hotswapagentforge.forge.HotswapEvent") }.isSuccess private val obj = if (isForgeSidePresent) { - Supplier<HotswapSupportHandle?> { HotswapSupportImpl() } - } else { - Supplier<HotswapSupportHandle?> { null } - }.get() + HotswapSupportImpl() + } else null fun isLoaded(): Boolean { return obj?.isLoaded() ?: false |
