diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt index 469c48489..a07960231 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt @@ -170,7 +170,7 @@ object MayorAPI { } ?: false } ?: return - val perk = stack.getLore().nextAfter({ perkpocalypsePerksPattern.matches(it) }) ?: return + val perk = stack.getLore().nextAfter({ perkpocalypsePerksPattern.matches(it) }, 2) ?: return // This is the first Perk of the Perkpocalypse Mayor val jerryMayor = getMayorFromPerk(getPerkFromName(perk.removeColor()) ?: return)?.addAllPerks() ?: return 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 769184077..e1c5d3f84 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 @@ -784,6 +784,11 @@ private fun getMayorDisplayPair() = buildList { } if (!mayorConfig.showExtraMayor) return@buildList + addAll(addMinister()) + addAll(addPerkpocalypseMayor()) +} + +private fun addMinister() = buildList { val ministerName = MayorAPI.currentMinister?.mayorName?.let { MayorAPI.mayorNameWithColorCode(it) } ?: return@buildList add(ministerName to HorizontalAlignment.LEFT) @@ -792,7 +797,9 @@ private fun getMayorDisplayPair() = buildList { add(" §7- §e${perk.perkName}" to HorizontalAlignment.LEFT) } } +} +private fun addPerkpocalypseMayor() = buildList { val jerryExtraMayor = MayorAPI.jerryExtraMayor val extraMayor = jerryExtraMayor.first ?: return@buildList |