From 10c51c80f5546ae67e45bf6367dcc7e2622f6cdd Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 24 May 2024 14:40:10 +0200 Subject: Improvement: Better NEU missing/outdated warning (#1847) --- .../at/hannibal2/skyhanni/utils/NEUVersionCheck.kt | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUVersionCheck.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUVersionCheck.kt index 01331bbdb..0a182d531 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUVersionCheck.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUVersionCheck.kt @@ -17,13 +17,7 @@ object NEUVersionCheck { try { Class.forName("io.github.moulberry.notenoughupdates.NotEnoughUpdates") } catch (e: Throwable) { - neuWarning( - "NotEnoughUpdates is missing!\n" + - "SkyHanni requires the latest version of NotEnoughUpdates to work.\n" + - "You currently need NEU version 2.2.0 or later.\n" + - "NEU 2.1 is NOT the latest version.\n" + - "Use these links to download the latest version:" - ) + neuWarning("missing") return } @@ -35,21 +29,19 @@ object NEUVersionCheck { } } catch (_: Throwable) { } - neuWarning( - "NotEnoughUpdates is outdated!\n" + - "You currently need NEU version 2.2.0 or later.\n" + - "NEU 2.1 is NOT the latest version.\n" + - "Use these links to download the latest version:" - ) + neuWarning("outdated") } - private fun neuWarning(text: String) { + private fun neuWarning(what: String) { openPopupWindow( - text, + "NotEnoughUpdates is $what!\n" + + "SkyHanni requires the latest version of NotEnoughUpdates to work.\n" + + "Use these links to download the latest version:", Pair("Join SkyHanni Discord", "https://discord.com/invite/skyhanni-997079228510117908"), Pair("Open SkyHanni GitHub", "https://github.com/hannibal002/SkyHanni"), Pair("Join NEU Discord", "https://discord.gg/moulberry"), - Pair("Download NEU 2.2.0", "https://github.com/NotEnoughUpdates/NotEnoughUpdates/releases/tag/2.2.0"), + Pair("Download NEU from GitHub", "https://github.com/NotEnoughUpdates/NotEnoughUpdates/releases/latest"), + Pair("Download NEU from Modrinth", "https://modrinth.com/mod/notenoughupdates/version/latest"), ) closeMinecraft() } -- cgit