diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-05 00:22:32 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-05 00:22:32 +0200 |
commit | c3a9516a09d01469c1317d556fddffa5dbd04306 (patch) | |
tree | cd3f2b1539c8909e37d988c8d6ec24631ced7a58 /src/main/java/at | |
parent | d7e00bac87aa94914da54b1dfc18b548e5aa066e (diff) | |
download | skyhanni-c3a9516a09d01469c1317d556fddffa5dbd04306.tar.gz skyhanni-c3a9516a09d01469c1317d556fddffa5dbd04306.tar.bz2 skyhanni-c3a9516a09d01469c1317d556fddffa5dbd04306.zip |
Removed Duplicate Hider.
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt | 19 |
2 files changed, 1 insertions, 25 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java index eb3778240..b39adb8e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java @@ -131,13 +131,6 @@ public class InventoryConfig { public boolean jacobFarmingContestHighlightRewards = true; @Expose - @ConfigOption(name = "Duplicate Hider", desc = "Hides duplicate farming contests in the Jacob inventory.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean jacobFarmingContestHideDuplicates = true; - - @Expose @ConfigOption(name = "Contest Time", desc = "Adds the real time format to the Contest description.") @ConfigEditorBoolean @ConfigAccordionId(id = 3) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt index 3137fac42..3ad7f70d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt @@ -20,7 +20,6 @@ import java.text.SimpleDateFormat import java.util.Locale class JacobFarmingContestsInventory { - private val duplicateSlots = mutableListOf<Int>() private val realTime = mutableMapOf<Int, String>() private val formatDay = SimpleDateFormat("dd MMMM yyyy", Locale.US) @@ -33,7 +32,6 @@ class JacobFarmingContestsInventory { @SubscribeEvent fun onInventoryClose(event: InventoryCloseEvent) { - duplicateSlots.clear() realTime.clear() hideEverything = true } @@ -43,7 +41,6 @@ class JacobFarmingContestsInventory { if (!LorenzUtils.inSkyBlock) return if (event.inventoryName != "Your Contests") return - duplicateSlots.clear() realTime.clear() val foundEvents = mutableListOf<String>() @@ -53,9 +50,6 @@ class JacobFarmingContestsInventory { val name = item.name!! if (foundEvents.contains(name)) { - if (config.jacobFarmingContestHideDuplicates) { - duplicateSlots.add(slot) - } } else { foundEvents.add(name) } @@ -82,7 +76,7 @@ class JacobFarmingContestsInventory { if (!config.jacobFarmingContestHighlightRewards) return // hide green border for a tick - if (config.jacobFarmingContestHideDuplicates && hideEverything) return + if (hideEverything) return if (event.gui !is GuiChest) return val guiChest = event.gui @@ -91,7 +85,6 @@ class JacobFarmingContestsInventory { for (slot in chest.inventorySlots) { if (slot == null) continue if (slot.slotNumber != slot.slotIndex) continue - if (duplicateSlots.contains(slot.slotNumber)) continue val stack = slot.stack ?: continue if (stack.getLore().any { it == "§eClick to claim reward!" }) { slot highlight LorenzColor.GREEN @@ -102,7 +95,6 @@ class JacobFarmingContestsInventory { @SubscribeEvent fun onDrawSlot(event: GuiContainerEvent.DrawSlotEvent.GuiContainerDrawSlotPre) { if (!LorenzUtils.inSkyBlock) return - if (!config.jacobFarmingContestHideDuplicates) return if (!InventoryUtils.openInventoryName().contains("Your Contests")) return if (hideEverything) { @@ -115,8 +107,6 @@ class JacobFarmingContestsInventory { } - val slot = event.slot.slotNumber - if (!duplicateSlots.contains(slot)) return event.isCanceled = true } @@ -126,13 +116,6 @@ class JacobFarmingContestsInventory { if (!InventoryUtils.openInventoryName().contains("Your Contests")) return val slot = event.slot.slotNumber - if (config.jacobFarmingContestHideDuplicates && duplicateSlots.contains(slot)) { - event.toolTip.clear() - event.toolTip.add("§7Duplicate contest") - event.toolTip.add("§7hidden by SkyHanni!") - return - } - if (config.jacobFarmingContestRealTime) { realTime[slot]?.let { val toolTip = event.toolTip |