Skip to content

Commit

Permalink
fixed first() incorrect placement
Browse files Browse the repository at this point in the history
  • Loading branch information
zealerker22 committed Jul 20, 2024
1 parent 6aee7a9 commit 8bf938d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,11 @@ object ItemFeatures {
val prefix: String = if (enchant != null) {
val parts = enchant.loreName.split(" ")
val joined = if (parts.size > 1) parts.joinToString("") { it[0].uppercase() }
else if (parts[0].startsWith("Turbo-")) "${
parts[0].split("-").first().take(3).toTitleCase()
else if (parts.first().startsWith("Turbo-")) "${
parts.first().split("-")[1].take(3).toTitleCase()
}."
else "${
parts[0].take(3).toTitleCase()
parts.first().take(3).toTitleCase()
}."
if (enchant.nbtName.startsWith("ultimate")) {
"§d§l${joined}"
Expand Down

0 comments on commit 8bf938d

Please sign in to comment.