diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-09-09 15:07:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 15:07:12 +0200 |
commit | 2b4011efc9ef79fc478b44bce4959dc37424138a (patch) | |
tree | ac14c0c20615bb074378e6ea3558a6ffda041f3c /src/main/java/at/hannibal2/skyhanni/config | |
parent | 8fb2fbf7e06f6d711a9093334f7fa14df794be20 (diff) | |
download | skyhanni-2b4011efc9ef79fc478b44bce4959dc37424138a.tar.gz skyhanni-2b4011efc9ef79fc478b44bce4959dc37424138a.tar.bz2 skyhanni-2b4011efc9ef79fc478b44bce4959dc37424138a.zip |
Feature: Show Custom Scoreboard outside SkyBlock (#1881)
Co-authored-by: Cal <cwolfson58@gmail.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
5 files changed, 19 insertions, 8 deletions
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<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/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 @@ -71,6 +71,11 @@ public class DisplayConfig { 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 public boolean showUnclaimedBits = false; 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<String> 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<OutsideSbFeature> showOutsideSB = new ArrayList<>(); + public Property<List<OutsideSbFeature>> showOutsideSB = Property.of(new ArrayList<>()); @Expose @ConfigOption(name = "Exp Bottles", desc = "Hide all the experience orbs lying on the ground.") |