diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-03-03 23:12:21 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-03-03 23:12:21 +0100 |
commit | 87a3f4262b71c022f845999604109678ef0ccffb (patch) | |
tree | 31815d3a4faf01ea8b1b91e7e5dc48a87947f2e3 /src/main/java/at | |
parent | f6187bc90066198aa0c4bf6634d044cb4c89661c (diff) | |
download | skyhanni-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.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt | 3 |
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() |