aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-03 23:12:21 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-03 23:12:21 +0100
commit87a3f4262b71c022f845999604109678ef0ccffb (patch)
tree31815d3a4faf01ea8b1b91e7e5dc48a87947f2e3 /src/main/java/at
parentf6187bc90066198aa0c4bf6634d044cb4c89661c (diff)
downloadskyhanni-87a3f4262b71c022f845999604109678ef0ccffb.tar.gz
skyhanni-87a3f4262b71c022f845999604109678ef0ccffb.tar.bz2
skyhanni-87a3f4262b71c022f845999604109678ef0ccffb.zip
Added option to hide Profit Trackers while not inside an inventory.
Diffstat (limited to 'src/main/java/at')
-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()