Format code

This commit is contained in:
2026-05-16 23:08:09 +02:00
parent 81dd8045f2
commit d110df924e
562 changed files with 11025 additions and 10059 deletions
@@ -26,7 +26,7 @@ import de.steamwar.tntleague.game.TNTLeagueTeam
import de.steamwar.tntleague.message
import org.bukkit.entity.Player
data class TNTLeagueScoreboard(val p: Player): ScoreboardCallback {
data class TNTLeagueScoreboard(val p: Player) : ScoreboardCallback {
override fun getData(): HashMap<String, Int> {
val lines = mutableListOf<String>()
@@ -40,8 +40,12 @@ data class TNTLeagueScoreboard(val p: Player): ScoreboardCallback {
when (val team = TNTLeagueGame.getTeam(p)) {
is TNTLeagueTeam -> lines.add(message.parse("SCOREBOARD_COINS", p, team.coins))
else -> lines.add(message.parse("SCOREBOARD_COINS", p,
"§${TNTLeagueGame.blueTeam.color}${TNTLeagueGame.blueTeam.coins}§8:§${TNTLeagueGame.redTeam.color}${TNTLeagueGame.redTeam.coins}"))
else -> lines.add(
message.parse(
"SCOREBOARD_COINS", p,
"§${TNTLeagueGame.blueTeam.color}${TNTLeagueGame.blueTeam.coins}§8:§${TNTLeagueGame.redTeam.color}${TNTLeagueGame.redTeam.coins}"
)
)
}
lines.add("§3")
@@ -59,5 +63,6 @@ data class TNTLeagueScoreboard(val p: Player): ScoreboardCallback {
.foldIndexed(HashMap()) { index, acc, component -> acc.also { it[component] = index } }
}
override fun getTitle(): String = message.parse("PREFIX", p).dropLast(1)
override fun getTitle(): String =
message.parse("PREFIX", p).dropLast(1)
}