From a2f29b2bfe846c9d0cd2a45b2b8352bab556da37 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:46:53 +1000 Subject: Even more annotation (#2031) --- .../gui/customscoreboard/CustomScoreboard.kt | 26 +++++++++++----------- .../gui/customscoreboard/CustomScoreboardUtils.kt | 2 +- .../gui/customscoreboard/RenderBackground.kt | 6 ++--- .../gui/customscoreboard/ScoreboardElements.kt | 14 ++++++------ .../gui/customscoreboard/ScoreboardEvents.kt | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui') diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt index 05e2b518a..f0601c557 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt @@ -27,6 +27,7 @@ import at.hannibal2.skyhanni.events.GuiPositionMovedEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ConditionalUtils.onToggle import at.hannibal2.skyhanni.utils.DelayedRun.runDelayed @@ -45,7 +46,8 @@ import kotlin.time.Duration.Companion.seconds typealias ScoreboardElementType = Pair -class CustomScoreboard { +@SkyHanniModule +object CustomScoreboard { private var display = emptyList() private var cache = emptyList() @@ -102,18 +104,16 @@ class CustomScoreboard { UnknownLinesHandler.handleUnknownLines() } - companion object { - internal val config get() = SkyHanniMod.feature.gui.customScoreboard - internal val displayConfig get() = config.display - internal val alignmentConfig get() = displayConfig.alignment - internal val arrowConfig get() = displayConfig.arrow - internal val eventsConfig get() = displayConfig.events - internal val mayorConfig get() = displayConfig.mayor - internal val partyConfig get() = displayConfig.party - internal val maxwellConfig get() = displayConfig.maxwell - internal val informationFilteringConfig get() = config.informationFiltering - internal val backgroundConfig get() = config.background - } + internal val config get() = SkyHanniMod.feature.gui.customScoreboard + internal val displayConfig get() = config.display + internal val alignmentConfig get() = displayConfig.alignment + internal val arrowConfig get() = displayConfig.arrow + internal val eventsConfig get() = displayConfig.events + internal val mayorConfig get() = displayConfig.mayor + internal val partyConfig get() = displayConfig.party + internal val maxwellConfig get() = displayConfig.maxwell + internal val informationFilteringConfig get() = config.informationFiltering + internal val backgroundConfig get() = config.background private fun createLines() = buildList { for (element in config.scoreboardEntries) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt index cf6840f48..8aae8fe55 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboardUtils.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.config.features.gui.customscoreboard.DisplayConfig import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.features.bingo.BingoAPI -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.displayConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.displayConfig import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt index a55cf8b65..3d4e6daad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.gui.customscoreboard import at.hannibal2.skyhanni.config.core.config.Position import at.hannibal2.skyhanni.data.GuiEditManager -import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsX -import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsY -import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getDummySize +import at.hannibal2.skyhanni.data.GuiEditManager.getAbsX +import at.hannibal2.skyhanni.data.GuiEditManager.getAbsY +import at.hannibal2.skyhanni.data.GuiEditManager.getDummySize import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.RenderUtils import io.github.moulberry.notenoughupdates.util.Utils diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt index ef02cf2ba..467f752da 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt @@ -17,13 +17,13 @@ import at.hannibal2.skyhanni.data.QuiverAPI.asArrowPercentage import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.features.dungeon.DungeonAPI -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.arrowConfig -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.config -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.displayConfig -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.informationFilteringConfig -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.maxwellConfig -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.mayorConfig -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.partyConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.arrowConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.config +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.displayConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.informationFilteringConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.maxwellConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.mayorConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.partyConfig import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboardUtils.formatNum import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboardUtils.getGroupFromPattern import at.hannibal2.skyhanni.test.command.ErrorManager diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt index 3e7fe1577..f8e7313d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.features.dungeon.DungeonAPI -import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.eventsConfig +import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.eventsConfig import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvents.VOTING import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern import at.hannibal2.skyhanni.features.misc.ServerRestartTitle -- cgit