Skip to content

Commit

Permalink
bump migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsEmpa committed Oct 18, 2024
1 parent 57b9cfb commit ea71366
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {

val logger = LorenzLogger("ConfigMigration")
const val CONFIG_VERSION = 62
const val CONFIG_VERSION = 63
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ object CustomScoreboardConfigFix {
JsonPrimitive(!it.asBoolean)
}

event.transform(62, EVENT_ENTRIES_KEY) { element ->
event.transform(63, EVENT_ENTRIES_KEY) { element ->
replaceElements(element, listOf("GARDEN_CLEAN_UP", "GARDEN_PASTING"), ScoreboardConfigEventElement.GARDEN.name)
}
listOf("customTitle", "customFooter").forEach { key ->
event.transform(62, "$TITLE_AND_FOOTER_KEY.$key") {
event.transform(63, "$TITLE_AND_FOOTER_KEY.$key") {
JsonPrimitive(it.asString.replace("&", "&&"))
}
}
listOf("alignTitle", "alignFooter").forEach { key ->
event.move(62, "$TITLE_AND_FOOTER_KEY.alignTitleAndFooter", "$TITLE_AND_FOOTER_KEY.$key")
event.move(63, "$TITLE_AND_FOOTER_KEY.alignTitleAndFooter", "$TITLE_AND_FOOTER_KEY.$key")
}
}

Expand Down

0 comments on commit ea71366

Please sign in to comment.