diff options
author | HiZe <super@hize.be> | 2024-05-29 09:47:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 09:47:53 +0200 |
commit | 8ce2c5c720a69380816484805d971f919f2d0c59 (patch) | |
tree | 87320bac6f3870b1b960a62da46d80a439a664fe | |
parent | a2c73ff23ddcf11113cfdd31a6d3d66af3d0ca90 (diff) | |
download | skyhanni-8ce2c5c720a69380816484805d971f919f2d0c59.tar.gz skyhanni-8ce2c5c720a69380816484805d971f919f2d0c59.tar.bz2 skyhanni-8ce2c5c720a69380816484805d971f919f2d0c59.zip |
Feature: Toggle for limbo in detailed /playtime (#1863)
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index 5e9a82e03..6e4fe4f12 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -224,6 +224,14 @@ public class MiscConfig { @Expose @ConfigOption( + name = "Limbo Playtime Detailed", + desc = "Show your total time in limbo in the detailed /playtime.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showLimboTimeInPlaytimeDetailed = true; + + @Expose + @ConfigOption( name = "Lesser Orb of Healing Hider", desc = "Hides the Lesser Orb of Healing.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt index 8d4b3489f..d5a8a3765 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.misc.limbo +import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzToolTipEvent @@ -37,6 +38,7 @@ object LimboPlaytime { private var hoursString: String = "" private val storage get() = ProfileStorageData.playerSpecific?.limbo + private val enabled get() = SkyHanniMod.feature.misc.showLimboTimeInPlaytimeDetailed private val itemID = "ENDER_PEARL".asInternalName() private val itemName = "§aLimbo" @@ -45,6 +47,7 @@ object LimboPlaytime { @SubscribeEvent fun replaceItem(event: ReplaceItemEvent) { + if (!enabled) return if (event.inventory !is ContainerLocalMenu) return if (event.inventory.name != "Detailed /playtime") return if (event.slotNumber != 43) return @@ -76,6 +79,7 @@ object LimboPlaytime { @SubscribeEvent fun onTooltip(event: LorenzToolTipEvent) { if (!LorenzUtils.inSkyBlock) return + if (!enabled) return if (!event.slot.inventory.name.startsWith("Detailed /playtime")) return if (event.slot.slotIndex != 4) return val playtime = storage?.playtime ?: 0 |