diff options
| author | Walker Selby <git@walkerselby.com> | 2023-10-15 12:50:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-15 13:50:14 +0200 |
| commit | 0bdfaab9e486f0c6adc576e3a939838ef1827c80 (patch) | |
| tree | 9bb2f1bd50b62590220440b94f2cad0fda7f9e9b /src/main/java/at/hannibal2/skyhanni/config | |
| parent | 202759b6752741e32c3b2d3e022ea8d71400188f (diff) | |
| download | skyhanni-0bdfaab9e486f0c6adc576e3a939838ef1827c80.tar.gz skyhanni-0bdfaab9e486f0c6adc576e3a939838ef1827c80.tar.bz2 skyhanni-0bdfaab9e486f0c6adc576e3a939838ef1827c80.zip | |
Internal Change: Config deprecations (#542)
migrate the config, removed id system entirely #542
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
15 files changed, 1851 insertions, 2047 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<String>, 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; |
