diff options
author | nea <nea@nea.moe> | 2023-06-11 02:50:01 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-11 02:50:01 +0200 |
commit | db8e3640e8f9c14b7027c9e92b810ed127391ced (patch) | |
tree | d674641d0e719fe9b83685f346d80395d71d54dc /src/main/kotlin/moe/nea/firmament/apis/Profiles.kt | |
parent | a36c8f1c0eae969dcee8cf690f12d9121350212d (diff) | |
download | firmament-db8e3640e8f9c14b7027c9e92b810ed127391ced.tar.gz firmament-db8e3640e8f9c14b7027c9e92b810ed127391ced.tar.bz2 firmament-db8e3640e8f9c14b7027c9e92b810ed127391ced.zip |
Fix name being lowercased by HyPixel
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/apis/Profiles.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/apis/Profiles.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt b/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt index ae23349..553fd9f 100644 --- a/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt +++ b/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt @@ -167,10 +167,10 @@ data class PlayerData( ) { val rankPlusDyeColor = LegacyFormattingCode.values().find { it.name == rankPlusColor } ?: LegacyFormattingCode.GOLD val rankData get() = RepoManager.neuRepo.constants.misc.ranks[if (monthlyPackageRank == "NONE" || monthlyPackageRank == null) packageRank else monthlyPackageRank] - fun getDisplayName() = rankData?.let { + fun getDisplayName(name: String = playerName) = rankData?.let { ("§${it.color}[${it.tag}${rankPlusDyeColor.modern}" + - "${it.plus ?: ""}§${it.color}] $playerName") - } ?: "${Formatting.GRAY}${playerName}" + "${it.plus ?: ""}§${it.color}] $name") + } ?: "${Formatting.GRAY}$name" } |