aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java
index 50e990700..d7e53aedd 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/TrackerConfig.java
@@ -118,6 +118,10 @@ public class TrackerConfig {
@ConfigOption(name = "Still Show Above", desc = "Always show items above this §6price in 1k §7even when not in the top # of items.")
@ConfigEditorSlider(minValue = 5, maxValue = 500, minStep = 5)
public Property<Integer> minPrice = Property.of(100);
-
}
+
+ @Expose
+ @ConfigOption(name = "Hide outside Inventory", desc = "Hide Profit Trackers while not insidie an inventory.")
+ @ConfigEditorBoolean
+ public boolean hideItemTrackersOutsideInventory = false;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
index 8eebcd2aa..226e00dfa 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
@@ -83,6 +83,9 @@ open class SkyHanniTracker<Data : TrackerData>(
if (config.hideInEstimatedItemValue && EstimatedItemValue.isCurrentlyShowing()) return
val currentlyOpen = Minecraft.getMinecraft().currentScreen is GuiInventory
+ if (!currentlyOpen && config.hideItemTrackersOutsideInventory && this is SkyHanniItemTracker) {
+ return
+ }
if (inventoryOpen != currentlyOpen) {
inventoryOpen = currentlyOpen
update()