From 2b4011efc9ef79fc478b44bce4959dc37424138a Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:07:12 +0200 Subject: Feature: Show Custom Scoreboard outside SkyBlock (#1881) Co-authored-by: Cal Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../at/hannibal2/skyhanni/config/enums/OutsideSbFeature.kt | 7 ++++--- .../config/features/gui/customscoreboard/DisplayConfig.java | 5 +++++ .../features/gui/customscoreboard/TitleAndFooterConfig.java | 10 +++++++--- .../at/hannibal2/skyhanni/config/features/misc/MiscConfig.java | 3 ++- 5 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index b67713435..c881cc578 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 56 + const val CONFIG_VERSION = 57 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/enums/OutsideSbFeature.kt b/src/main/java/at/hannibal2/skyhanni/config/enums/OutsideSbFeature.kt index e334785c5..9180273aa 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/enums/OutsideSbFeature.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/enums/OutsideSbFeature.kt @@ -18,10 +18,11 @@ enum class OutsideSbFeature(private val displayName: String) { FOLLOWING_LINE("Following Line"), ARROW_TRAIL("Arrow Trail"), HIGHLIGHT_PARTY_MEMBERS("Highlight Party Members"), - MOVEMENT_SPEED("Movement Speed"); + MOVEMENT_SPEED("Movement Speed"), + CUSTOM_SCOREBOARD("Custom Scoreboard (only on Hypixel)"), + ; override fun toString() = displayName - fun isSelected() = - Minecraft.getMinecraft().thePlayer != null && SkyHanniMod.feature.misc.showOutsideSB.contains(this) + fun isSelected() = Minecraft.getMinecraft().thePlayer != null && SkyHanniMod.feature.misc.showOutsideSB.get().contains(this) } 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 0d61401ee..2f0eb502e 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 @@ -70,6 +70,11 @@ public class DisplayConfig { @ConfigEditorBoolean public boolean hideCoinsDifference = false; + @Expose + @ConfigOption(name = "Use Custom Lines", desc = "Use custom lines instead of the default ones.") + @ConfigEditorBoolean + public boolean useCustomLines = true; + @Expose @ConfigOption(name = "Show unclaimed bits", desc = "Show the amount of available Bits that can still be claimed.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/TitleAndFooterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/TitleAndFooterConfig.java index 6bb517d6f..1c3bb4304 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/TitleAndFooterConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/TitleAndFooterConfig.java @@ -23,10 +23,14 @@ public class TitleAndFooterConfig { public Property customTitle = Property.of("&6&lSKYBLOCK"); @Expose - @ConfigOption(name = "Hypixel's Title Animation", desc = "Will overwrite the custom title with Hypixel's title animation." + - "\nWill also include \"COOP\" if you are in a coop.") + @ConfigOption(name = "Use Custom Title", desc = "Use a custom title instead of the default Hypixel title.") @ConfigEditorBoolean - public boolean useHypixelTitleAnimation = false; + public boolean useCustomTitle = true; + + @Expose + @ConfigOption(name = "Use Custom Title Outside SkyBlock", desc = "Use a custom title outside of SkyBlock.") + @ConfigEditorBoolean + public boolean useCustomTitleOutsideSkyBlock = false; @Expose @ConfigOption(name = "Custom Footer", desc = "What should be displayed as the footer of the scoreboard." + diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index a06055f97..1464d35ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -15,6 +15,7 @@ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; import java.util.ArrayList; import java.util.List; @@ -121,7 +122,7 @@ public class MiscConfig { @Expose @ConfigOption(name = "Show Outside SkyBlock", desc = "Show these features outside of SkyBlock.") @ConfigEditorDraggableList - public List showOutsideSB = new ArrayList<>(); + public Property> showOutsideSB = Property.of(new ArrayList<>()); @Expose @ConfigOption(name = "Exp Bottles", desc = "Hide all the experience orbs lying on the ground.") -- cgit