summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/gui
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-22 09:33:15 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-22 09:33:15 +0200
commit8f3314c9397a62085941ece6d9fe2114f5338889 (patch)
tree298798c38d4875893787446b3af351660b4d3436 /src/main/java/at/hannibal2/skyhanni/features/gui
parentc52a71ee63c633d17d7a935c0aa92ddda904c750 (diff)
downloadskyhanni-8f3314c9397a62085941ece6d9fe2114f5338889.tar.gz
skyhanni-8f3314c9397a62085941ece6d9fe2114f5338889.tar.bz2
skyhanni-8f3314c9397a62085941ece6d9fe2114f5338889.zip
enum is singular
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt (renamed from src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt)6
3 files changed, 10 insertions, 10 deletions
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 721ec62ce..a4d5bd628 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
@@ -242,7 +242,7 @@ object CustomScoreboard {
event.transform(37, "$displayPrefix.events.eventEntries") { element ->
val array = element.asJsonArray
- array.add(JsonPrimitive(ScoreboardEvents.QUEUE.name))
+ array.add(JsonPrimitive(ScoreboardEvent.QUEUE.name))
array
}
event.transform(40, "$displayPrefix.events.eventEntries") { element ->
@@ -257,7 +257,7 @@ object CustomScoreboard {
}
if (jsonArray.any { it.asString in listOf("HOT_DOG_CONTEST", "EFFIGIES") }) {
- newArray.add(JsonPrimitive(ScoreboardEvents.RIFT.name))
+ newArray.add(JsonPrimitive(ScoreboardEvent.RIFT.name))
}
newArray
@@ -283,13 +283,13 @@ object CustomScoreboard {
}
event.transform(50, "$displayPrefix.events.eventEntries") { element ->
val array = element.asJsonArray
- array.add(JsonPrimitive(ScoreboardEvents.ANNIVERSARY.name))
- array.add(JsonPrimitive(ScoreboardEvents.CARNIVAL.name))
+ array.add(JsonPrimitive(ScoreboardEvent.ANNIVERSARY.name))
+ array.add(JsonPrimitive(ScoreboardEvent.CARNIVAL.name))
array
}
event.transform(51, "$displayPrefix.events.eventEntries") { element ->
val array = element.asJsonArray
- array.add(JsonPrimitive(ScoreboardEvents.NEW_YEAR.name))
+ array.add(JsonPrimitive(ScoreboardEvent.NEW_YEAR.name))
array
}
}
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 116cecd19..ab3584251 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
@@ -730,13 +730,13 @@ private fun getPowderDisplayPair() = buildList {
private fun getPowderShowWhen() = inAdvancedMiningIsland()
-private fun getEventsDisplayPair(): List<ScoreboardElementType> = ScoreboardEvents.getEvent()
+private fun getEventsDisplayPair(): List<ScoreboardElementType> = ScoreboardEvent.getEvent()
.filterNotNull()
.flatMap { it.getLines().map { i -> i to HorizontalAlignment.LEFT } }
.takeIf { it.isNotEmpty() } ?: listOf("<hidden>" to HorizontalAlignment.LEFT)
-private fun getEventsShowWhen() = ScoreboardEvents.getEvent().isNotEmpty()
+private fun getEventsShowWhen() = ScoreboardEvent.getEvent().isNotEmpty()
private fun getMayorDisplayPair() = buildList {
val currentMayorName = MayorAPI.currentMayor?.mayorName?.let { MayorAPI.mayorNameWithColorCode(it) } ?: "<hidden>"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt
index ebeed5eee..7279079ef 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt
@@ -5,7 +5,7 @@ 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.eventsConfig
-import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvents.VOTING
+import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvent.VOTING
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
import at.hannibal2.skyhanni.features.misc.ServerRestartTitle
import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies
@@ -32,7 +32,7 @@ private fun getSbLines(): List<String> {
return ScoreboardData.sidebarLinesFormatted
}
-enum class ScoreboardEvents(
+enum class ScoreboardEvent(
private val displayLine: () -> List<String>,
private val showWhen: () -> Boolean,
private val configLine: String,
@@ -194,7 +194,7 @@ enum class ScoreboardEvents(
fun getLines(): List<String> = displayLine()
companion object {
- fun getEvent() = buildList<ScoreboardEvents?> {
+ fun getEvent() = buildList<ScoreboardEvent?> {
if (eventsConfig.showAllActiveEvents) {
for (event in eventsConfig.eventEntries) {
if (event.showWhen()) {