From 0bdfaab9e486f0c6adc576e3a939838ef1827c80 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Sun, 15 Oct 2023 12:50:14 +0100 Subject: Internal Change: Config deprecations (#542) migrate the config, removed id system entirely #542 --- .../skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../skyhanni/config/features/ChatConfig.java | 205 +- .../skyhanni/config/features/CombatConfig.java | 24 +- .../config/features/CrimsonIsleConfig.java | 4 +- .../skyhanni/config/features/DevConfig.java | 302 ++- .../skyhanni/config/features/DungeonConfig.java | 186 +- .../skyhanni/config/features/EventConfig.java | 18 +- .../skyhanni/config/features/FishingConfig.java | 140 +- .../skyhanni/config/features/GardenConfig.java | 2156 ++++++++++---------- .../skyhanni/config/features/InventoryConfig.java | 217 +- .../config/features/ItemAbilityConfig.java | 33 +- .../skyhanni/config/features/MinionsConfig.java | 104 +- .../skyhanni/config/features/MiscConfig.java | 251 ++- .../skyhanni/config/features/RiftConfig.java | 40 +- .../skyhanni/config/features/SlayerConfig.java | 240 ++- .../hannibal2/skyhanni/features/chat/ChatFilter.kt | 17 +- .../skyhanni/features/chat/WatchdogHider.kt | 8 +- .../features/chat/playerchat/PlayerChatModifier.kt | 14 +- .../damageindicator/DamageIndicatorManager.kt | 6 +- .../skyhanni/features/dungeon/DungeonCleanEnd.kt | 18 +- .../skyhanni/features/dungeon/DungeonCopilot.kt | 14 +- .../skyhanni/features/dungeon/DungeonHideItems.kt | 35 +- .../skyhanni/features/dungeon/DungeonLevelColor.kt | 8 +- .../skyhanni/features/fishing/FishingTimer.kt | 28 +- .../skyhanni/features/garden/AnitaMedalProfit.kt | 13 +- .../features/garden/FarmingFortuneDisplay.kt | 16 +- .../features/garden/GardenCropTimeCommand.kt | 4 +- .../skyhanni/features/garden/GardenLevelDisplay.kt | 13 +- .../features/garden/GardenNextJacobContest.kt | 46 +- .../skyhanni/features/garden/GardenOptimalSpeed.kt | 36 +- .../skyhanni/features/garden/ToolTooltipTweaks.kt | 10 +- .../features/garden/composter/ComposterDisplay.kt | 39 +- .../garden/composter/ComposterInventoryNumbers.kt | 8 +- .../features/garden/composter/ComposterOverlay.kt | 25 +- .../composter/GardenComposterInventoryFeatures.kt | 13 +- .../garden/contest/JacobContestFFNeededDisplay.kt | 2 +- .../contest/JacobFarmingContestsInventory.kt | 21 +- .../features/garden/farming/CropMoneyDisplay.kt | 72 +- .../features/garden/farming/DicerRngDropCounter.kt | 18 +- .../features/garden/farming/FarmingArmorDrops.kt | 18 +- .../garden/farming/FarmingWeightDisplay.kt | 28 +- .../features/garden/farming/GardenBestCropTime.kt | 37 +- .../garden/farming/GardenCropMilestoneDisplay.kt | 52 +- .../features/garden/farming/GardenCropSpeed.kt | 9 +- .../garden/farming/GardenCustomKeybinds.kt | 35 +- .../garden/inventory/AnitaExtraFarmingFortune.kt | 8 +- .../inventory/GardenCropMilestoneInventory.kt | 11 +- .../garden/inventory/GardenInventoryNumbers.kt | 17 +- .../garden/inventory/SkyMartCopperPrice.kt | 16 +- .../garden/visitor/GardenVisitorColorNames.kt | 2 +- .../garden/visitor/GardenVisitorDropStatistics.kt | 15 +- .../garden/visitor/GardenVisitorFeatures.kt | 98 +- .../features/garden/visitor/GardenVisitorTimer.kt | 19 +- .../features/inventory/HideNotClickableItems.kt | 25 +- .../features/inventory/RngMeterInventory.kt | 16 +- .../skyhanni/features/inventory/StatsTuning.kt | 17 +- .../itemabilities/FireVeilWandParticles.kt | 13 +- .../skyhanni/features/minion/MinionFeatures.kt | 20 +- .../skyhanni/features/misc/CurrentPetDisplay.kt | 10 +- .../features/misc/NonGodPotEffectDisplay.kt | 10 +- .../skyhanni/features/misc/ParticleHider.kt | 20 +- .../skyhanni/features/misc/PetExpTooltip.kt | 9 +- .../skyhanni/features/misc/QuickModMenuSwitch.kt | 8 +- .../features/misc/ThunderSparksHighlight.kt | 12 +- .../misc/compacttablist/AdvancedPlayerList.kt | 2 +- .../features/misc/items/EstimatedItemValue.kt | 25 +- .../features/misc/items/EstimatedWardrobePrice.kt | 12 +- .../features/slayer/blaze/BlazeSlayerClearView.kt | 8 +- .../slayer/blaze/BlazeSlayerDaggerHelper.kt | 18 +- .../slayer/blaze/BlazeSlayerFirePitsWarning.kt | 8 +- .../features/slayer/blaze/HellionShieldHelper.kt | 10 +- .../slayer/enderman/EndermanSlayerFeatures.kt | 24 +- .../slayer/enderman/EndermanSlayerHideParticles.kt | 8 +- .../mixins/transformers/MixinBlockFire.java | 2 +- .../mixins/transformers/MixinEntityBlaze.java | 2 +- .../mixins/transformers/MixinEntityEnderman.java | 2 +- .../mixins/transformers/MixinEntityFireball.java | 2 +- .../skyhanni/test/CommandsSendToServerLogger.kt | 9 +- .../skyhanni/test/HighlightMissingRepoItems.kt | 8 +- .../at/hannibal2/skyhanni/test/ShowItemUuid.kt | 8 +- .../skyhanni/test/SkyHanniDebugsAndTests.kt | 25 +- .../skyhanni/test/TestCopyBestiaryValues.kt | 8 +- .../skyhanni/test/TestCopyRngMeterValues.kt | 8 +- .../at/hannibal2/skyhanni/test/TestExportTools.kt | 8 +- .../at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 +- .../skyhanni/utils/MinecraftConsoleFilter.kt | 47 +- 86 files changed, 2790 insertions(+), 2387 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 2b2d6f756..eff921734 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -9,7 +9,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - val configVersion = 2 + val configVersion = 3 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java index e23246580..e0324c32f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java @@ -2,14 +2,9 @@ package at.hannibal2.skyhanni.config.features; import at.hannibal2.skyhanni.config.FeatureToggle; import com.google.gson.annotations.Expose; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; -import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.annotations.*; import org.lwjgl.input.Keyboard; -@SuppressWarnings("deprecation") public class ChatConfig { @Expose @@ -19,113 +14,103 @@ public class ChatConfig { @Expose @ConfigOption(name = "Chat Filter Types", desc = "") - @ConfigEditorAccordion(id = 0) - public boolean filterTypes = false; - - @Expose - @ConfigOption(name = "Hypixel Hub", desc = "Block messages outside SkyBlock in the Hypixel lobby: player joins, loot boxes, prototype lobby messages, radiating generosity and Hypixel tournaments.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean hypixelHub = true; - - @Expose - @ConfigOption(name = "Empty", desc = "Hide all the empty messages from the chat.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean empty = true; - - @Expose - @ConfigOption(name = "Warping", desc = "Block 'Sending request to join...' and 'Warping...' messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean warping = true; - - @Expose - @ConfigOption(name = "Welcome", desc = "Hide the 'Welcome to SkyBlock' message.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean welcome = true; - - @Expose - @ConfigOption(name = "Guild Exp", desc = "Hide Guild EXP messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean guildExp = true; - - @Expose - @ConfigOption(name = "Friend Join Left", desc = "Hide friend join/left messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean friendJoinLeft = false; - - @Expose - @ConfigOption(name = "Winter Gifts", desc = "Hide useless Winter Gift messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean winterGift = false; - - @Expose - @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in the Crystal Hollows. " + - "(Except powder numbers over 1k, Prehistoric Egg and Automaton Parts)") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean powderMining = true; - - @Expose - @ConfigOption(name = "Kill Combo", desc = "Hide messages about the current Kill Combo from the Grandma Wolf Pet.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean killCombo = false; - - @Expose - @ConfigOption(name = "Watchdog", desc = "Hide the message where Hypixel is flexing how many players they have banned over the last week.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean watchDog = true; - - @Expose - @ConfigOption(name = "Profile Join", desc = "Hide 'You are playing on profile' and 'Profile ID' chat messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean profileJoin = true; - - //TODO remove - @Expose - @ConfigOption(name = "Others", desc = "Hide other annoying messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean others = false; + @Accordion + public FilterTypesConfig filterType = new FilterTypesConfig(); + + public static class FilterTypesConfig{ + @Expose + @ConfigOption(name = "Hypixel Hub", desc = "Block messages outside SkyBlock in the Hypixel lobby: player joins, loot boxes, prototype lobby messages, radiating generosity and Hypixel tournaments.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hypixelHub = true; + + @Expose + @ConfigOption(name = "Empty", desc = "Hide all the empty messages from the chat.") + @ConfigEditorBoolean + @FeatureToggle + public boolean empty = true; + + @Expose + @ConfigOption(name = "Warping", desc = "Block 'Sending request to join...' and 'Warping...' messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean warping = true; + + @Expose + @ConfigOption(name = "Welcome", desc = "Hide the 'Welcome to SkyBlock' message.") + @ConfigEditorBoolean + @FeatureToggle + public boolean welcome = true; + + @Expose + @ConfigOption(name = "Guild Exp", desc = "Hide Guild EXP messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean guildExp = true; + + @Expose + @ConfigOption(name = "Friend Join Left", desc = "Hide friend join/left messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean friendJoinLeft = false; + + @Expose + @ConfigOption(name = "Winter Gifts", desc = "Hide useless Winter Gift messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean winterGift = false; + + @Expose + @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in the Crystal Hollows. " + + "(Except powder numbers over 1k, Prehistoric Egg and Automaton Parts)") + @ConfigEditorBoolean + @FeatureToggle + public boolean powderMining = true; + + @Expose + @ConfigOption(name = "Kill Combo", desc = "Hide messages about the current Kill Combo from the Grandma Wolf Pet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean killCombo = false; + + @Expose + @ConfigOption(name = "Watchdog", desc = "Hide the message where Hypixel is flexing how many players they have banned over the last week.") + @ConfigEditorBoolean + @FeatureToggle + public boolean watchDog = true; + + @Expose + @ConfigOption(name = "Profile Join", desc = "Hide 'You are playing on profile' and 'Profile ID' chat messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean profileJoin = true; + + //TODO remove + @Expose + @ConfigOption(name = "Others", desc = "Hide other annoying messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean others = false; + } @Expose @ConfigOption(name = "Player Messages", desc = "") - @ConfigEditorAccordion(id = 1) - public boolean playerMessages = false; - - @Expose - @ConfigOption(name = "Player Rank Hider", desc = "Hide player ranks in all chat messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - @FeatureToggle - public boolean playerRankHider = false; - - @Expose - @ConfigOption(name = "Chat Filter", desc = "Scan messages sent by players for blacklisted words and gray out the message if any are found.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - @FeatureToggle - public boolean chatFilter = false; + @Accordion + public PlayerMessagesConfig playerMessage = new PlayerMessagesConfig(); + + public static class PlayerMessagesConfig{ + @Expose + @ConfigOption(name = "Player Rank Hider", desc = "Hide player ranks in all chat messages.") + @ConfigEditorBoolean + @FeatureToggle + public boolean playerRankHider = false; + + @Expose + @ConfigOption(name = "Chat Filter", desc = "Scan messages sent by players for blacklisted words and gray out the message if any are found.") + @ConfigEditorBoolean + @FeatureToggle + public boolean chatFilter = false; + } @Expose @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in Dungeons.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java index 58bd6fe26..a54feefe5 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java @@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.features.misc.ghostcounter.GhostFormatting; import at.hannibal2.skyhanni.features.misc.ghostcounter.GhostUtil; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; @@ -127,7 +126,7 @@ public class CombatConfig { @Expose @ConfigOption(name = "Vampire Slayer", desc = "") @Accordion - public DamageIndicatorConfig.VampireSlayerConfig vampireSlayer = new DamageIndicatorConfig.VampireSlayerConfig(); + public VampireSlayerConfig vampireSlayer = new VampireSlayerConfig(); public static class VampireSlayerConfig { @Expose @@ -194,9 +193,9 @@ public class CombatConfig { @ConfigOption(name = "Text Formatting", desc = "") @Accordion @Expose - public TextFormatting textFormatting = new TextFormatting(); + public TextFormattingConfig textFormatting = new TextFormattingConfig(); - public static class TextFormatting { + public static class TextFormattingConfig { @ConfigOption(name = "§eText Formatting Info", desc = "§e%session% §ris §e§lalways §rreplaced with\n" + "§7the count for your current session.\n" + @@ -304,9 +303,9 @@ public class CombatConfig { @ConfigOption(name = "Bestiary Formatting", desc = "") @Accordion @Expose - public BestiaryFormatting bestiaryFormatting = new BestiaryFormatting(); + public BestiaryFormattingConfig bestiaryFormatting = new BestiaryFormattingConfig(); - public static class BestiaryFormatting { + public static class BestiaryFormattingConfig { @Expose @ConfigOption(name = "Bestiary", desc = "Bestiary Progress line.\n§e%value% §7is replaced with\n" + @@ -346,9 +345,9 @@ public class CombatConfig { @ConfigOption(name = "XP Per Hour Formatting", desc = "") @Accordion @Expose - public XPHourFormatting xpHourFormatting = new XPHourFormatting(); + public XPHourFormattingConfig xpHourFormatting = new XPHourFormattingConfig(); - public static class XPHourFormatting { + public static class XPHourFormattingConfig { @Expose @ConfigOption(name = "XP/h", desc = "XP Per Hour line.\n" + @@ -372,9 +371,9 @@ public class CombatConfig { @ConfigOption(name = "ETA Formatting", desc = "") @Accordion @Expose - public ETAFormatting etaFormatting = new ETAFormatting(); + public ETAFormattingConfig etaFormatting = new ETAFormattingConfig(); - public static class ETAFormatting { + public static class ETAFormattingConfig { @Expose @ConfigOption(name = "ETA to next level", desc = "ETA To Next Level Line.\n" + "§e%value% §7is replaced with one of the text below.") @@ -414,9 +413,9 @@ public class CombatConfig { @ConfigOption(name = "Kill Per Hour Formatting", desc = "") @Expose @Accordion - public KillHourFormatting killHourFormatting = new KillHourFormatting(); + public KillHourFormattingConfig killHourFormatting = new KillHourFormattingConfig(); - public static class KillHourFormatting { + public static class KillHourFormattingConfig { @Expose @ConfigOption(name = "Kill/h", desc = "Kill Per Hour line.\n§e%value% §7is replaced with\nEstimated kills per hour you get.") @ConfigEditorText @@ -529,7 +528,6 @@ public class CombatConfig { @Expose @ConfigOption(name = "Highlighters", desc = "") - @ConfigEditorAccordion(id = 0) public boolean highlighters = false; @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java index 11966d0a3..a6927b522 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java @@ -112,9 +112,9 @@ public class CrimsonIsleConfig { @ConfigOption(name = "Reputation Helper", desc = "") @Accordion @Expose - public ReputatioHelperConfig reputationHelper = new ReputatioHelperConfig(); + public ReputationHelperConfig reputationHelper = new ReputationHelperConfig(); - public static class ReputatioHelperConfig { + public static class ReputationHelperConfig { @Expose @ConfigOption(name = "Enabled", desc = "Enable features around Reputation features in the Crimson Isle.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java index 5fdf918e2..edf6391b4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/DevConfig.java @@ -3,8 +3,6 @@ package at.hannibal2.skyhanni.config.features; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; import io.github.moulberry.moulconfig.annotations.ConfigOption; @@ -20,90 +18,78 @@ public class DevConfig { @Expose @ConfigOption(name = "Debug", desc = "") - @ConfigEditorAccordion(id = 0) - public boolean debugDO_NOT_USE = false; - - @Expose - @ConfigOption(name = "Enable Debug", desc = "Enable Test logic") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean debugEnabled = false; + @Accordion + public DebugConfig debug = new DebugConfig(); + public static class DebugConfig{ + @Expose + @ConfigOption(name = "Enable Debug", desc = "Enable Test logic") + @ConfigEditorBoolean + public boolean enabled = false; - @Expose - @ConfigOption(name = "Command Logging", desc = "Logs stack trace information into the console when a command gets sent to Hypixel. (by any mod or the player)") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean commandLogs = false; + @Expose + @ConfigOption(name = "Command Logging", desc = "Logs stack trace information into the console when a command gets sent to Hypixel. (by any mod or the player)") + @ConfigEditorBoolean + public boolean commandLogs = false; - @Expose - @ConfigOption( - name = "Mod Menu Log", - desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + - "Useful for adding more mods to quick mod menu switch." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean modMenuLog = false; + @Expose + @ConfigOption( + name = "Mod Menu Log", + desc = "Enables debug messages when the currently opened GUI changes, with the path to the gui class. " + + "Useful for adding more mods to quick mod menu switch." + ) + @ConfigEditorBoolean + public boolean modMenuLog = false; - @Expose - @ConfigOption(name = "Show Internal Name", desc = "Show internal names in item lore.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean showInternalName = false; + @Expose + @ConfigOption(name = "Show Internal Name", desc = "Show internal names in item lore.") + @ConfigEditorBoolean + public boolean showInternalName = false; - @Expose - @ConfigOption(name = "Show Empty Internal Names", desc = "Shows internal name even for items with none.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean showEmptyNames = false; + @Expose + @ConfigOption(name = "Show Empty Internal Names", desc = "Shows internal name even for items with none.") + @ConfigEditorBoolean + public boolean showEmptyNames = false; - @Expose - @ConfigOption(name = "Show Item Rarity", desc = "Show item rarities in item lore.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean showItemRarity = false; + @Expose + @ConfigOption(name = "Show Item Rarity", desc = "Show item rarities in item lore.") + @ConfigEditorBoolean + public boolean showItemRarity = false; - @Expose - @ConfigOption(name = "Copy Internal Name", desc = "Copies the internal name of an item on key press in the clipboard.") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - @ConfigAccordionId(id = 0) - public int copyInternalName = Keyboard.KEY_NONE; + @Expose + @ConfigOption(name = "Copy Internal Name", desc = "Copies the internal name of an item on key press in the clipboard.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyInternalName = Keyboard.KEY_NONE; - @Expose - @ConfigOption(name = "Show NPC Price", desc = "Show NPC price in item lore.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean showNpcPrice = false; + @Expose + @ConfigOption(name = "Show NPC Price", desc = "Show NPC price in item lore.") + @ConfigEditorBoolean + public boolean showNpcPrice = false; - @Expose - @ConfigOption(name = "Show Item UUID", desc = "Show the Unique Identifier of items in the lore.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean showItemUuid = false; + @Expose + @ConfigOption(name = "Show Item UUID", desc = "Show the Unique Identifier of items in the lore.") + @ConfigEditorBoolean + public boolean showItemUuid = false; - @Expose - @ConfigOption(name = "Copy NBT Data", desc = "Copies compressed NBT data on key press in a GUI") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - @ConfigAccordionId(id = 0) - public int copyNBTDataCompressed = Keyboard.KEY_NONE; + @Expose + @ConfigOption(name = "Copy NBT Data", desc = "Copies compressed NBT data on key press in a GUI") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyNBTDataCompressed = Keyboard.KEY_NONE; - @Expose - @ConfigOption(name = "Copy RNG Meter", desc = "Copies internal names and maxed XP needed from RNG meter inventories as json to clipboard.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean copyRngMeter = false; + @Expose + @ConfigOption(name = "Copy RNG Meter", desc = "Copies internal names and maxed XP needed from RNG meter inventories as json to clipboard.") + @ConfigEditorBoolean + public boolean copyRngMeter = false; - @Expose + @Expose @ConfigOption(name = "Copy Bestiary Data", desc = "Copies the bestiary data from the inventory as json to clipboard.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean copyBestiaryData = false; + @ConfigEditorBoolean + public boolean copyBestiaryData = false; - @Expose - @ConfigOption(name = "Highlight Missing Repo Items", desc = "Highlights each item in the current inventory that is not in your current NEU repo.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean highlightMissingRepo = false; + @Expose + @ConfigOption(name = "Highlight Missing Repo Items", desc = "Highlights each item in the current inventory that is not in your current NEU repo.") + @ConfigEditorBoolean + public boolean highlightMissingRepo = false; + } @Expose @ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.") @@ -113,9 +99,9 @@ public class DevConfig { @ConfigOption(name = "Parkour Waypoints", desc = "") @Accordion @Expose - public Waypoints waypoint = new Waypoints(); + public WaypointsConfig waypoint = new WaypointsConfig(); - public static class Waypoints { + public static class WaypointsConfig { @Expose @ConfigOption(name = "Save Hotkey", desc = "Saves block location to a temporarily parkour and copies everything to your clipboard.") @@ -142,97 +128,87 @@ public class DevConfig { @Expose @ConfigOption(name = "Minecraft Console", desc = "") - @ConfigEditorAccordion(id = 1) - public boolean minecraftConsole = false; - - @Expose - @ConfigOption(name = "Unfiltered Debug", desc = "Print the debug information for unfiltered console messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - public boolean printUnfilteredDebugs = false; - - @Expose - @ConfigOption(name = "Unfiltered Debug File", desc = "Print the debug information into log files instead of into the console for unfiltered console messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - public boolean logUnfilteredFile = false; - - @Expose - @ConfigOption( - name = "Outside SkyBlock", - desc = "Print the debug information for unfiltered console messages outside SkyBlock too." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - public boolean printUnfilteredDebugsOutsideSkyBlock = false; - - @Expose - @ConfigOption( - name = "Log Filtered", - desc = "Log the filtered messages into the console." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - public boolean printFilteredReason = false; - - @Expose - @ConfigOption(name = "Console Filters", desc = "") - @ConfigAccordionId(id = 1) - @ConfigEditorAccordion(id = 2) - public boolean consoleFilters = false; - - @Expose - @ConfigOption(name = "Filter Chat", desc = "Filter chat messages.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterChat = false; - - @Expose - @ConfigOption(name = "Filter Grow Buffer", desc = "Filter 'Needed to grow BufferBuilder buffer:'") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterGrowBuffer = true; - - @Expose - @ConfigOption(name = "Filter Sound Error", desc = "Filter 'Unable to play unknown soundEvent'.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterUnknownSound = true; - - @Expose - @ConfigOption(name = "Filter Scoreboard Errors", desc = "Filter error messages with Scoreboard: removeTeam, createTeam, " + - "removeObjective and 'scoreboard team already exists'.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterScoreboardErrors = true; + @Accordion + public MinecraftConsoleConfig minecraftConsoles = new MinecraftConsoleConfig(); - @Expose - @ConfigOption(name = "Filter Particle", desc = "Filter message 'Could not spawn particle effect VILLAGER_HAPPY'.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterParticleVillagerHappy = true; + public static class MinecraftConsoleConfig{ + @Expose + @ConfigOption(name = "Unfiltered Debug", desc = "Print the debug information for unfiltered console messages.") + @ConfigEditorBoolean + public boolean printUnfilteredDebugs = false; - @Expose - @ConfigOption(name = "Filter OptiFine", desc = "Filter OptiFine messages CustomItems and ConnectedTextures during loading.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterOptiFine = true; + @Expose + @ConfigOption(name = "Unfiltered Debug File", desc = "Print the debug information into log files instead of into the console for unfiltered console messages.") + @ConfigEditorBoolean + public boolean logUnfilteredFile = false; - @Expose - @ConfigOption(name = "Filter AsmHelper Transformer", desc = "Filter messages when AsmHelper is Transforming a class during loading.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterAmsHelperTransformer = true; + @Expose + @ConfigOption( + name = "Outside SkyBlock", + desc = "Print the debug information for unfiltered console messages outside SkyBlock too." + ) + @ConfigEditorBoolean + public boolean printUnfilteredDebugsOutsideSkyBlock = false; - @Expose - @ConfigOption(name = "Filter Applying AsmWriter", desc = "Filter messages when AsmHelper is applying AsmWriter ModifyWriter.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterAsmHelperApplying = true; + @Expose + @ConfigOption( + name = "Log Filtered", + desc = "Log the filtered messages into the console." + ) + @ConfigEditorBoolean + public boolean printFilteredReason = false; - @Expose - @ConfigOption(name = "Filter Biome ID Bounds", desc = "Filter message 'Biome ID is out of bounds'.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean filterBiomeIdBounds = true; + @Expose + @ConfigOption(name = "Console Filters", desc = "") + @Accordion + public ConsoleFiltersConfig consoleFilter = new ConsoleFiltersConfig(); + + public static class ConsoleFiltersConfig{ + @Expose + @ConfigOption(name = "Filter Chat", desc = "Filter chat messages.") + @ConfigEditorBoolean + public boolean filterChat = false; + + @Expose + @ConfigOption(name = "Filter Grow Buffer", desc = "Filter 'Needed to grow BufferBuilder buffer:'") + @ConfigEditorBoolean + public boolean filterGrowBuffer = true; + + @Expose + @ConfigOption(name = "Filter Sound Error", desc = "Filter 'Unable to play unknown soundEvent'.") + @ConfigEditorBoolean + public boolean filterUnknownSound = true; + + @Expose + @ConfigOption(name = "Filter Scoreboard Errors", desc = "Filter error messages with Scoreboard: removeTeam, createTeam, " + + "removeObjective and 'scoreboard team already exists'.") + @ConfigEditorBoolean + public boolean filterScoreboardErrors = true; + + @Expose + @ConfigOption(name = "Filter Particle", desc = "Filter message 'Could not spawn particle effect VILLAGER_HAPPY'.") + @ConfigEditorBoolean + public boolean filterParticleVillagerHappy = true; + + @Expose + @ConfigOption(name = "Filter OptiFine", desc = "Filter OptiFine messages CustomItems and ConnectedTextures during loading.") + @ConfigEditorBoolean + public boolean filterOptiFine = true; + + @Expose + @ConfigOption(name = "Filter AsmHelper Transformer", desc = "Filter messages when AsmHelper is Transforming a class during loading.") + @ConfigEditorBoolean + public boolean filterAmsHelperTransformer = true; + + @Expose + @ConfigOption(name = "Filter Applying AsmWriter", desc = "Filter messages when AsmHelper is applying AsmWriter ModifyWriter.") + @ConfigEditorBoolean + public boolean filterAsmHelperApplying = true; + + @Expose + @ConfigOption(name = "Filter Biome ID Bounds", desc = "Filter message 'Biome ID is out of bounds'.") + @ConfigEditorBoolean + public boolean filterBiomeIdBounds = true; + } + } } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java index c4c241ad0..20b6e0295 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/DungeonConfig.java @@ -4,8 +4,6 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigOption; @@ -35,24 +33,24 @@ public class DungeonConfig { @Expose public Position deathCounterPos = new Position(10, 10, false, true); - @ConfigOption(name = "Clean End", desc = "") - @ConfigEditorAccordion(id = 2) - public boolean cleanEnd = false; - @Expose - @ConfigOption(name = "Clean Ending", desc = "After the last Dungeon boss has died, all entities and " + - "particles are no longer displayed and the music stops playing, but the loot chests are still displayed.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - @FeatureToggle - public boolean cleanEndToggle = false; + @ConfigOption(name = "Clean End", desc = "") + @Accordion + public CleanEndConfig cleanEnd = new CleanEndConfig(); + public static class CleanEndConfig{ + @Expose + @ConfigOption(name = "Clean Ending", desc = "After the last Dungeon boss has died, all entities and " + + "particles are no longer displayed and the music stops playing, but the loot chests are still displayed.") + @ConfigEditorBoolean + @FeatureToggle + public boolean toggle = false; - @Expose - @ConfigOption(name = "Ignore Guardians", desc = "Ignore F3 and M3 Guardians from the clean end feature when " + - "sneaking. Makes it easier to kill them after the boss died already. Thanks Hypixel.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean cleanEndF3IgnoreGuardians = false; + @Expose + @ConfigOption(name = "Ignore Guardians", desc = "Ignore F3 and M3 Guardians from the clean end feature when " + + "sneaking. Makes it easier to kill them after the boss died already. Thanks Hypixel.") + @ConfigEditorBoolean + public boolean F3IgnoreGuardians = false; + } @Expose @ConfigOption(name = "Boss Damage Splash", desc = "Hides damage splashes while inside the boss room (fixes a Skytils feature).") @@ -73,101 +71,101 @@ public class DungeonConfig { public boolean highlightTeammates = true; + @Expose @ConfigOption(name = "Object Hider", desc = "Hide various things in Dungeons.") - @ConfigEditorAccordion(id = 3) - public boolean objectHider = false; + @Accordion + public ObjectHiderConfig objectHider = new ObjectHiderConfig(); + public static class ObjectHiderConfig { + @Expose + @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSuperboomTNT = false; - @Expose - @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideSuperboomTNT = false; + @Expose + @ConfigOption(name = "Hide Blessings", desc = "Hide Blessings laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideBlessing = false; - @Expose - @ConfigOption(name = "Hide Blessings", desc = "Hide Blessings laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideBlessing = false; + @Expose + @ConfigOption(name = "Hide Revive Stones", desc = "Hide Revive Stones laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideReviveStone = false; - @Expose - @ConfigOption(name = "Hide Revive Stones", desc = "Hide Revive Stones laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideReviveStone = false; + @Expose + @ConfigOption(name = "Hide Premium Flesh", desc = "Hide Premium Flesh laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hidePremiumFlesh = false; - @Expose - @ConfigOption(name = "Hide Premium Flesh", desc = "Hide Premium Flesh laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hidePremiumFlesh = false; + @Expose + @ConfigOption(name = "Hide Journal Entry", desc = "Hide Journal Entry pages laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideJournalEntry = false; - @Expose - @ConfigOption(name = "Hide Journal Entry", desc = "Hide Journal Entry pages laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideJournalEntry = false; + @Expose + @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideSkeletonSkull = true; - @Expose - @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideSkeletonSkull = true; + @Expose + @ConfigOption(name = "Hide Healer Orbs", desc = "Hides the damage, ability damage and defensive orbs that spawn when the Healer kills mobs.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideHealerOrbs = false; - @Expose - @ConfigOption(name = "Hide Healer Orbs", desc = "Hides the damage, ability damage and defensive orbs that spawn when the Healer kills mobs.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideHealerOrbs = false; + @Expose + @ConfigOption(name = "Hide Healer Fairy", desc = "Hide the Golden Fairy that follows the Healer in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hideHealerFairy = false; + } @Expose - @ConfigOption(name = "Hide Healer Fairy", desc = "Hide the Golden Fairy that follows the Healer in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean hideHealerFairy = false; - @ConfigOption(name = "Message Filter", desc = "") - @ConfigEditorAccordion(id = 4) - public boolean messageFilter = false; + @Accordion + public MessageFilterConfig messageFilter = new MessageFilterConfig(); - @Expose - @ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 4) - @FeatureToggle - public boolean messageFilterKeysAndDoors = false; + public static class MessageFilterConfig{ + @Expose + @ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean keysAndDoors = false; + } + @Expose @ConfigOption(name = "Dungeon Copilot", desc = "") - @ConfigEditorAccordion(id = 5) - public boolean dungeonCopilot = false; + @Accordion + public DungeonCopilotConfig dungeonCopilot = new DungeonCopilotConfig(); - @Expose - @ConfigOption(name = "Copilot Enabled", desc = "Suggests what to do next in Dungeons.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 5) - @FeatureToggle - public boolean copilotEnabled = false; + public static class DungeonCopilotConfig{ + @Expose + @ConfigOption(name = "Copilot Enabled", desc = "Suggests what to do next in Dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; - @Expose - public Position copilotPos = new Position(10, 10, false, true); + @Expose + public Position pos = new Position(10, 10, false, true); + } - @ConfigOption(name = "Party Finder", desc = "") - @ConfigEditorAccordion(id = 6) - public boolean partyFinder = false; @Expose - @ConfigOption(name = "Colored Class Level", desc = "Color class levels in Party Finder.") - @ConfigAccordionId(id = 6) - @ConfigEditorBoolean - @FeatureToggle - public boolean partyFinderColoredClassLevel = true; + @ConfigOption(name = "Party Finder", desc = "") + @Accordion + public PartyFinderConfig partyFinder = new PartyFinderConfig(); + public static class PartyFinderConfig { + @Expose + @ConfigOption(name = "Colored Class Level", desc = "Color class levels in Party Finder.") + @ConfigEditorBoolean + @FeatureToggle + public boolean coloredClassLevel = true; + } @Expose @ConfigOption(name = "Tab List", desc = "") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java index b0bcf8e04..a349fb2f0 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java @@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; @@ -28,9 +27,9 @@ public class EventConfig { @Expose @ConfigOption(name = "Bingo Card", desc = "") @Accordion - public BingoCard bingoCard = new BingoCard(); + public BingoCardConfig bingoCard = new BingoCardConfig(); - public static class BingoCard { + public static class BingoCardConfig { @Expose @ConfigOption(name = "Enable", desc = "Displays the Bingo Card.") @ConfigEditorBoolean @@ -70,9 +69,9 @@ public class EventConfig { @Expose @ConfigOption(name = "Compact Chat Messages", desc = "") @Accordion - public CompactChat compactChat = new CompactChat(); + public CompactChatConfig compactChat = new CompactChatConfig(); - public static class CompactChat { + public static class CompactChatConfig { @Expose @ConfigOption(name = "Enable", desc = "Shortens chat messages about skill level ups, collection gains, " + @@ -160,10 +159,9 @@ public class EventConfig { @Expose @ConfigOption(name = "Inquisitor Waypoint Sharing", desc = "") @Accordion - @ConfigAccordionId(id = 9) - public InquisitorSharing inquisitorSharing = new InquisitorSharing(); + public InquisitorSharingConfig inquisitorSharing = new InquisitorSharingConfig(); - public static class InquisitorSharing { + public static class InquisitorSharingConfig { @Expose @ConfigOption(name = "Enabled", desc = "Shares your Inquisitor and receiving other Inquisitors via Party Chat.") @@ -330,9 +328,9 @@ public class EventConfig { // @ConfigOption(name = "300þ Anniversary Celebration", desc = "Features for the 300þ year of SkyBlock") @Accordion @Expose - public Century century = new Century(); + public CenturyConfig century = new CenturyConfig(); - public static class Century { + public static class CenturyConfig { @ConfigOption(name = "Enable Active Player Timer", desc = "Show a HUD telling you how much longer you have to wait to be eligible for another free ticket.") @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java index f05f8ea22..70957e0ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java @@ -4,8 +4,6 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; @@ -91,89 +89,85 @@ public class FishingConfig { public boolean odgerLocation = true; } + @Expose @ConfigOption(name = "Thunder Spark", desc = "") - @ConfigEditorAccordion(id = 1) - public boolean thunderSpark = false; + @Accordion + public ThunderSparkConfig thunderSpark = new ThunderSparkConfig(); + public static class ThunderSparkConfig { + @Expose + @ConfigOption(name = "Thunder Spark Highlight", desc = "Highlight Thunder Sparks after killing a Thunder.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; - @Expose - @ConfigOption(name = "Thunder Spark Highlight", desc = "Highlight Thunder Sparks after killing a Thunder.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 1) - @FeatureToggle - public boolean thunderSparkHighlight = false; + @Expose + @ConfigOption(name = "Thunder Spark Color", desc = "Color of the Thunder Sparks.") + @ConfigEditorColour + public String color = "0:255:255:255:255"; + } @Expose - @ConfigOption(name = "Thunder Spark Color", desc = "Color of the Thunder Sparks.") - @ConfigEditorColour - @ConfigAccordionId(id = 1) - public String thunderSparkColor = "0:255:255:255:255"; - @ConfigOption(name = "Barn Fishing Timer", desc = "") - @ConfigEditorAccordion(id = 2) - public boolean barnTimer_ = false; - - @Expose - @ConfigOption( - name = "Barn Fishing Timer", - desc = "Show the time and amount of sea creatures while fishing on the barn via hub." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - @FeatureToggle - public boolean barnTimer = true; + @Accordion + public BarnTimerConfig barnTimer = new BarnTimerConfig(); + public static class BarnTimerConfig{ + @Expose + @ConfigOption( + name = "Barn Fishing Timer", + desc = "Show the time and amount of sea creatures while fishing on the barn via hub." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; - @Expose - public Position barnTimerPos = new Position(10, 10, false, true); + @Expose + @ConfigOption( + name = "Worm Fishing", + desc = "Show the Barn Fishing Timer even for worms or other sea creatures in the Crystal Hollows." + ) + @ConfigEditorBoolean + public boolean crystalHollows = true; - @Expose - @ConfigOption( - name = "Worm Fishing", - desc = "Show the Barn Fishing Timer even for worms or other sea creatures in the Crystal Hollows." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean barnTimerCrystalHollows = true; + @Expose + @ConfigOption( + name = "Stranded Fishing", + desc = "Show the Barn Fishing Timer even on all the different islands Stranded players can visit." + ) + @ConfigEditorBoolean + public boolean forStranded = true; - @Expose - @ConfigOption( - name = "Stranded Fishing", - desc = "Show the Barn Fishing Timer even on all the different islands Stranded players can visit." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean barnTimerForStranded = true; + @Expose + @ConfigOption( + name = "Worm Cap Alert", + desc = "Alerts you with sound if you hit the Worm Sea Creature limit of 60." + ) + @ConfigEditorBoolean + public boolean wormLimitAlert = true; - @Expose - @ConfigOption( - name = "Worm Cap Alert", - desc = "Alerts you with sound if you hit the Worm Sea Creature limit of 60." - ) - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean wormLimitAlert = true; + @Expose + @ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manualy") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int manualResetTimer = Keyboard.KEY_NONE; - @Expose - @ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manualy") - @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) - @ConfigAccordionId(id = 2) - public int manualResetTimer = Keyboard.KEY_NONE; + @Expose + @ConfigOption(name = "Fishing Timer Alert", desc = "Change the amount of time in seconds until the timer dings.") + @ConfigEditorSlider( + minValue = 240, + maxValue = 360, + minStep = 10 + ) + public int alertTime = 330; - @Expose - @ConfigOption(name = "Fishing Timer Alert", desc = "Change the amount of time in seconds until the timer dings.") - @ConfigEditorSlider( - minValue = 240, - maxValue = 360, - minStep = 10 - ) - @ConfigAccordionId(id = 2) - public int barnTimerAlertTime = 330; + @Expose + public Position pos = new Position(10, 10, false, true); + } @Expose @ConfigOption(name = "Chum/Chumcap Bucket Hider", desc = "") @Accordion - public ChumBucketHider chumBucketHider = new ChumBucketHider(); + public ChumBucketHiderConfig chumBucketHider = new ChumBucketHiderConfig(); - public static class ChumBucketHider { + public static class ChumBucketHiderConfig { @Expose @ConfigOption(name = "Enable", desc = "Hide the Chum/Chumcap Bucket name tags for other players.") @@ -195,9 +189,9 @@ public class FishingConfig { @Expose @ConfigOption(name = "Fished Item Name", desc = "") @Accordion - public FishedItemName fishedItemName = new FishedItemName(); + public FishedItemNameConfig fishedItemName = new FishedItemNameConfig(); - public static class FishedItemName { + public static class FishedItemNameConfig { @Expose @ConfigOption(name = "Enabled", desc = "Show the fished item name above the item when fishing.") @@ -215,9 +209,9 @@ public class FishingConfig { @Expose @ConfigOption(name = "Fishing Hook Display", desc = "") @Accordion - public FishingHookDisplay fishingHookDisplay = new FishingHookDisplay(); + public FishingHookDisplayConfig fishingHookDisplay = new FishingHookDisplayConfig(); - public static class FishingHookDisplay { + public static class FishingHookDisplayConfig { @Expose @ConfigOption(name = "Enabled", desc = "Display the Hypixel timer until the fishing hook can be pulled out of the water/lava, only bigger and on your screen.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java index a74895a7f..ad1643128 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java @@ -7,8 +7,6 @@ import at.hannibal2.skyhanni.features.garden.inventory.GardenPlotIcon; import at.hannibal2.skyhanni.utils.LorenzUtils; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; -import io.github.moulberry.moulconfig.annotations.ConfigAccordionId; -import io.github.moulberry.moulconfig.annotations.ConfigEditorAccordion; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigEditorButton; import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; @@ -25,1307 +23,1207 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -@SuppressWarnings("deprecation") public class GardenConfig { @Expose @ConfigOption(name = "SkyMart", desc = "") - @ConfigEditorAccordion(id = 0) - public boolean skyMart = false; - - @Expose - @ConfigOption(name = "Copper Price", desc = "Show copper to coin prices inside the SkyMart inventory.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - @FeatureToggle - public boolean skyMartCopperPrice = true; + @Accordion + public SkyMartConfig skyMart = new SkyMartConfig(); + public static class SkyMartConfig{ + @Expose + @ConfigOption(name = "Copper Price", desc = "Show copper to coin prices inside the SkyMart inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean copperPrice = true; - @Expose - @ConfigOption(name = "Advanced Stats", desc = "Show the BIN price and copper price for every item.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 0) - public boolean skyMartCopperPriceAdvancedStats = false; + @Expose + @ConfigOption(name = "Advanced Stats", desc = "Show the BIN price and copper price for every item.") + @ConfigEditorBoolean + public boolean copperPriceAdvancedStats = false; - @Expose - public Position skyMartCopperPricePos = new Position(211, 132, false, true); + @Expose + public Position copperPricePos = new Position(211, 132, false, true); + } @Expose @ConfigOption(name = "Visitor", desc = "") - @ConfigEditorAccordion(id = 1) - public boolean visitor = false; - - @Expose - @ConfigOption(name = "Visitor Timer", desc = "") - @ConfigAccordionId(id = 1) - @ConfigEditorAccordion(id = 2) - public boolean visitorTimer = false; - - @Expose - @ConfigOption(name = "Visitor Timer", desc = "Timer when the next visitor will appear, " + - "and a number for how many visitors are already waiting.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - @FeatureToggle - public boolean visitorTimerEnabled = true; - - @Expose - @ConfigOption(name = "Sixth Visitor Estimate", desc = "Estimate when the sixth visitor in the queue will arrive. " + - "May be inaccurate with co-op members farming simultaneously.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean visitorTimerSixthVisitorEnabled = true; - - @Expose - @ConfigOption(name = "Sixth Visitor Warning", desc = "Notifies when it is believed that the sixth visitor has arrived. " + - "May be inaccurate with co-op members farming simultaneously.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 2) - public boolean visitorTimerSixthVisitorWarning = true; - - @Expose - public Position visitorTimerPos = new Position(390, 65, false, true); - - @Expose - @ConfigOption(name = "Visitor Items Needed", desc = "") - @ConfigAccordionId(id = 1) - @ConfigEditorAccordion(id = 3) - public boolean visitorNeeds = false; - - @Expose - @ConfigOption(name = "Items Needed", desc = "Show all items needed for the visitors.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - @FeatureToggle - public boolean visitorNeedsDisplay = true; - - @Expose - public Position visitorNeedsPos = new Position(180, 170, false, true); + @Accordion + public VisitorConfig visitors = new VisitorConfig(); + public static class VisitorConfig{ + @Expose + @ConfigOption(name = "Visitor Timer", desc = "") + @Accordion + public TimerConfig timer = new TimerConfig(); + public static class TimerConfig{ + @Expose + @ConfigOption(name = "Visitor Timer", desc = "Timer when the next visitor will appear, " + + "and a number for how many visitors are already waiting.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Sixth Visitor Estimate", desc = "Estimate when the sixth visitor in the queue will arrive. " + + "May be inaccurate with co-op members farming simultaneously.") + @ConfigEditorBoolean + public boolean sixthVisitorEnabled = true; + + @Expose + @ConfigOption(name = "Sixth Visitor Warning", desc = "Notifies when it is believed that the sixth visitor has arrived. " + + "May be inaccurate with co-op members farming simultaneously.") + @ConfigEditorBoolean + public boolean sixthVisitorWarning = true; + + @Expose + public Position pos = new Position(390, 65, false, true); + } - @Expose - @ConfigOption(name = "Only when Close", desc = "Only show the needed items when close to the visitors.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - public boolean visitorNeedsOnlyWhenClose = false; + @Expose + @ConfigOption(name = "Visitor Items Needed", desc = "") + @Accordion + public NeedsConfig needs = new NeedsConfig(); + public static class NeedsConfig{ + @Expose + @ConfigOption(name = "Items Needed", desc = "Show all items needed for the visitors.") + @ConfigEditorBoolean + @FeatureToggle + public boolean display = true; + + @Expose + public Position pos = new Position(180, 170, false, true); + + @Expose + @ConfigOption(name = "Only when Close", desc = "Only show the needed items when close to the visitors.") + @ConfigEditorBoolean + public boolean onlyWhenClose = false; + + @Expose + @ConfigOption(name = "Bazaar Alley", desc = "Show the Visitor Items List while inside the Bazaar Alley in the Hub. " + + "This helps buying the correct amount when not having a Booster Cookie Buff active.") + @ConfigEditorBoolean + public boolean inBazaarAlley = true; + + @Expose + @ConfigOption(name = "Show Price", desc = "Show the coin price in the items needed list.") + @ConfigEditorBoolean + public boolean showPrice = true; + + @Expose + @ConfigOption(name = "Item Preview", desc = "Show the base type for the required items next to new visitors. §cNote that some visitors may require any crop.") + @ConfigEditorBoolean + @FeatureToggle + public boolean itemPreview = true; + } - @Expose - @ConfigOption(name = "Bazaar Alley", desc = "Show the Visitor Items List while inside the Bazaar Alley in the Hub. " + - "This helps buying the correct amount when not having a Booster Cookie Buff active.") - @ConfigEditorBoolean - @ConfigAccordionId(id = 3) - public boolean visitorNeedsInBazaarAlley = true; + @Expose + @ConfigOption(name = "Visitor Inventory", desc = "") + @Accordion + public InventoryConfig inventory = new InventoryConfig(); + public static class InventoryConfig{ + @Expose + @ConfigOption(name = "Visitor Price", desc = "Show the Bazaar price of the items required for the visitors, like in NEU.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showPrice = false; + + @Expose + @ConfigOption(name = "Amount and Time", desc = "Show the exact item amount and the remaining time when farmed manually. Especially useful for Ironman.") + @ConfigEditorBoolean + public boolean exactAmountAndTime = true; + + @Expose + @ConfigOption(name = "Copper Price", desc = "Show the price per copper inside the visitor GUI.") + @ConfigEditorBoolean + @FeatureToggle + public boolean copperPrice = true; + + @Expose + @ConfigOption(name = "Copper Time", desc = "Show the time required per copper inside the visitor GUI.") + @ConfigEditorBoolean + @FeatureTo