aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt5
2 files changed, 11 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 beb7f2225..95d3281ec 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
@@ -303,4 +303,10 @@ public class MiscConfig {
@ConfigEditorBoolean
@FeatureToggle
public boolean maintainGameVolume = false;
+
+ @Expose
+ @ConfigOption(name = "SkyHanni User Luck", desc = "Shows SkyHanni User Luck in the SkyBlock Stats.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean userluckEnabled = true;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
index 8592a0d72..d4532a775 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.misc
+import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
@@ -33,6 +34,7 @@ object UserLuckBreakdown {
private var skillCalcCoolDown = SimpleTimeMark.farPast()
private val storage get() = ProfileStorageData.playerSpecific
+ private val config get() = SkyHanniMod.feature.misc
private lateinit var mainLuckItem: ItemStack
private val mainLuckID = "ENDER_PEARL".asInternalName()
@@ -71,6 +73,7 @@ object UserLuckBreakdown {
@SubscribeEvent
fun replaceItem(event: ReplaceItemEvent) {
+ if (!config.userluckEnabled) return
if (event.inventory !is ContainerLocalMenu) return
if (!inMiscStats) return
@@ -151,6 +154,7 @@ object UserLuckBreakdown {
@SubscribeEvent
fun onHoverItem(event: LorenzToolTipEvent) {
+ if (!config.userluckEnabled) return
if (!LorenzUtils.inSkyBlock) return
if (skillCalcCoolDown.passedSince() > 3.seconds) {
skillCalcCoolDown = SimpleTimeMark.now()
@@ -212,6 +216,7 @@ object UserLuckBreakdown {
@SubscribeEvent
fun onStackClick(event: GuiContainerEvent.SlotClickEvent) {
+ if (!config.userluckEnabled) return
if (!inMiscStats) return
val limboUserLuck = storage?.limbo?.userLuck ?: 0.0f
if (limboUserLuck == 0.0f && !showAllStats) return