diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 01:27:58 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 01:27:58 +0100 |
commit | 10d7b2b66c2437ae8d79ce3395293ca8c042226e (patch) | |
tree | 68b673487a8ba2e6430e9943501a3f025fcc8064 /src | |
parent | f79fa09b2a4d98964adb144bed2290a227b470da (diff) | |
download | skyhanni-10d7b2b66c2437ae8d79ce3395293ca8c042226e.tar.gz skyhanni-10d7b2b66c2437ae8d79ce3395293ca8c042226e.tar.bz2 skyhanni-10d7b2b66c2437ae8d79ce3395293ca8c042226e.zip |
fixed detecting last version
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt index 067a3a8bf..66f20f103 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt @@ -34,16 +34,15 @@ object DefaultConfigFeatures { SkyHanniMod.feature.storage.hasPlayedBefore = true LorenzUtils.clickableChat( "§e[SkyHanni] Looks like this is the first time you are using SkyHanni. " + - "Click here to configure default options, or run /shdefaultoptions.", + "Click here to configure default options, or run /shdefaultoptions.", "shdefaultoptions" ) } else if (updated) { - val mostFeatureFulOldVersion = - knownToggles.maxByOrNull { if (it.key != SkyHanniMod.version) it.value.size else -1 } - val command = "/shdefaultoptions ${mostFeatureFulOldVersion?.key} ${SkyHanniMod.version}" + val lastVersion = knownToggles.keys.last() + val command = "/shdefaultoptions $lastVersion ${SkyHanniMod.version}" LorenzUtils.clickableChat( "§e[SkyHanni] Looks like you updated SkyHanni. " + - "Click here to configure the newly introduced options, or run $command.", + "Click here to configure the newly introduced options, or run $command.", command ) } |