diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-03-28 10:07:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 10:07:10 +0100 |
commit | 0beb9e3b3132bcc14c99759628732625ee97d6a8 (patch) | |
tree | 314ec7c1904072821d067f6ce36242615466c13e /src/main/java/at/hannibal2/skyhanni/config | |
parent | 78ede4944f463fd2f0ac3715d68c3c6530c3f09e (diff) | |
download | skyhanni-0beb9e3b3132bcc14c99759628732625ee97d6a8.tar.gz skyhanni-0beb9e3b3132bcc14c99759628732625ee97d6a8.tar.bz2 skyhanni-0beb9e3b3132bcc14c99759628732625ee97d6a8.zip |
Improvement: Reordered Custom Scoreboard Config (#1294)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
6 files changed, 93 insertions, 64 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index ae97457ff..26ce3dfbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -11,7 +11,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 30 + const val CONFIG_VERSION = 31 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/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java index 3b5200c39..29d9e1779 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java @@ -49,6 +49,12 @@ public class DevConfig { @ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1) public int bowSoundDistance = 5; + @Expose + @ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard." + + "\nCustom Scoreboard debug option") + @ConfigEditorBoolean + public boolean unknownLinesWarning = false; + @ConfigOption(name = "Parkour Waypoints", desc = "") @Accordion @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/ArrowConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/ArrowConfig.java new file mode 100644 index 000000000..66dc1fda2 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/ArrowConfig.java @@ -0,0 +1,35 @@ +package at.hannibal2.skyhanni.config.features.gui.customscoreboard; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class ArrowConfig { + @Expose + @ConfigOption(name = "Arrow Amount Display", desc = "Determines how the arrow amount is displayed.") + @ConfigEditorDropdown + public ArrowAmountDisplay arrowAmountDisplay = ArrowAmountDisplay.NUMBER; + + public enum ArrowAmountDisplay { + NUMBER("Number"), + PERCENTAGE("Percentage"), + ; + + private final String str; + + ArrowAmountDisplay(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } + + @Expose + @ConfigOption(name = "Color Arrow Amount", desc = "Color the arrow amount based on the percentage.") + @ConfigEditorBoolean + public boolean colorArrowAmount = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java index 964a198dd..0fe04095d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java @@ -33,33 +33,18 @@ public class CustomScoreboardConfig { @Expose @ConfigOption(name = "Display Options", desc = "") @Accordion - public DisplayConfig displayConfig = new DisplayConfig(); + public DisplayConfig display = new DisplayConfig(); @Expose @ConfigOption(name = "Background Options", desc = "") @Accordion - public BackgroundConfig backgroundConfig = new BackgroundConfig(); - - @Expose - @ConfigOption(name = "Party Options", desc = "") - @Accordion - public PartyConfig partyConfig = new PartyConfig(); - - @Expose - @ConfigOption(name = "Mayor Options", desc = "") - @Accordion - public MayorConfig mayorConfig = new MayorConfig(); + public BackgroundConfig background = new BackgroundConfig(); @Expose @ConfigOption(name = "Information Filtering", desc = "") @Accordion - public InformationFilteringConfig informationFilteringConfig = new InformationFilteringConfig(); - + public InformationFilteringConfig informationFiltering = new InformationFilteringConfig(); - @Expose - @ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard.") - @ConfigEditorBoolean - public boolean unknownLinesWarning = true; @Expose public Position position = new Position(10, 80, false, true); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java index a9d176265..b8d5e82c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java @@ -16,14 +16,35 @@ public class DisplayConfig { public AlignmentConfig alignment = new AlignmentConfig(); @Expose - @ConfigOption(name = "Title and Footer Options", desc = "") + @ConfigOption(name = "Arrow Options", desc = "") @Accordion - public TitleAndFooterConfig titleAndFooter = new TitleAndFooterConfig(); + public ArrowConfig arrow = new ArrowConfig(); @Expose @ConfigOption(name = "Events Options", desc = "") @Accordion - public EventsConfig eventsConfig = new EventsConfig(); + public EventsConfig events = new EventsConfig(); + + @Expose + @ConfigOption(name = "Maxwell Options", desc = "") + @Accordion + public MaxwellConfig maxwell = new MaxwellConfig(); + + @Expose + @ConfigOption(name = "Mayor Options", desc = "") + @Accordion + public MayorConfig mayor = new MayorConfig(); + + @Expose + @ConfigOption(name = "Party Options", desc = "") + @Accordion + public PartyConfig party = new PartyConfig(); + + @Expose + @ConfigOption(name = "Title and Footer Options", desc = "") + @Accordion + public TitleAndFooterConfig titleAndFooter = new TitleAndFooterConfig(); + @Expose @ConfigOption(name = "Hide Vanilla Scoreboard", desc = "Hide the vanilla scoreboard." + @@ -44,11 +65,6 @@ public class DisplayConfig { public boolean showUnclaimedBits = false; @Expose - @ConfigOption(name = "Show Magical Power", desc = "Show your amount of Magical Power in the scoreboard.") - @ConfigEditorBoolean - public boolean showMagicalPower = true; - - @Expose @ConfigOption(name = "Show Max Island Players", desc = "Show the maximum amount of players that can join your current island.") @ConfigEditorBoolean public boolean showMaxIslandPlayers = true; @@ -75,43 +91,6 @@ public class DisplayConfig { } @Expose - @ConfigOption(name = "Arrow Amount Display", desc = "Determines how the arrow amount is displayed.") - @ConfigEditorDropdown - public ArrowAmountDisplay arrowAmountDisplay = ArrowAmountDisplay.NUMBER; - - public enum ArrowAmountDisplay { - NUMBER("Number"), - PERCENTAGE("Percentage"), - ; - - private final String str; - - ArrowAmountDisplay(String str) { - this.str = str; - } - - @Override - public String toString() { - return str; - } - } - - @Expose - @ConfigOption(name = "Color Arrow Amount", desc = "Color the arrow amount based on the percentage.") - @ConfigEditorBoolean - public boolean colorArrowAmount = false; - - @Expose - @ConfigOption(name = "Compact Tuning", desc = "Show tuning stats compact") - @ConfigEditorBoolean - public boolean compactTuning = false; - - @Expose - @ConfigOption(name = "Tuning Amount", desc = "Only show the first # tunings.\n§cDoes not work with Compact Tuning.") - @ConfigEditorSlider(minValue = 1, maxValue = 8, minStep = 1) - public int tuningAmount = 2; - - @Expose @ConfigOption(name = "Line Spacing", desc = "The amount of space between each line.") @ConfigEditorSlider(minValue = 0, maxValue = 20, minStep = 1) public int lineSpacing = 10; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MaxwellConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MaxwellConfig.java new file mode 100644 index 000000000..910414653 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MaxwellConfig.java @@ -0,0 +1,24 @@ +package at.hannibal2.skyhanni.config.features.gui.customscoreboard; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MaxwellConfig { + + @Expose + @ConfigOption(name = "Show Magical Power", desc = "Show your amount of Magical Power in the scoreboard.") + @ConfigEditorBoolean + public boolean showMagicalPower = true; + + @Expose + @ConfigOption(name = "Compact Tuning", desc = "Show tuning stats compact") + @ConfigEditorBoolean + public boolean compactTuning = false; + + @Expose + @ConfigOption(name = "Tuning Amount", desc = "Only show the first # tunings.\n§cDoes not work with Compact Tuning.") + @ConfigEditorSlider(minValue = 1, maxValue = 8, minStep = 1) + public int tuningAmount = 2; +} |