Skip to content

Commit

Permalink
fix: use MiniMessage instead of legacy formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Dec 3, 2024
1 parent f2b83cc commit 1b6e3da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# SpicyAzisaBan

[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.azisaba.net%2Frepository%2Fmaven-public%2Fnet%2Fazisaba%2Fspicyazisaban%2Fcommon%2Fmaven-metadata.xml)](https://repo.azisaba.net/#browse/browse:maven-public:net%2Fazisaba%2Fspicyazisaban%2Fcommon)

## Publishing to local maven repository
`./gradlew publishToMavenLocal`

## Building (to run the plugin)
`./gradlew shadowJar`

## Permissions (probably)
## Non-exhaustive list of permissions
- `sab.command.spicyazisaban`
- `sab.command.spicyazisaban.creategroup`
- `sab.command.spicyazisaban.deletegroup`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ object NameHistoryCommand : Command() {
names.mapIndexed { i, s ->
val isLast = names.lastIndex == i
if (pair.first.contains(s)) {
"§${if (isLast) 'a' else 'b'}§n$s§r"
"${if (isLast) "<green>" else "<aqua>"}<underlined>$s<reset>"
} else {
if (isLast) {
"§a$s"
"<green>$s"
} else {
"§e$s"
"<yellow>$s"
}
}
}.joinToString("§7 -> ").let { actor.send(it) }
}.joinToString("<gray> -> ").let { actor.send(it) }
}
}
.catch { actor.sendErrorMessage(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import net.azisaba.spicyAzisaBan.SABMessages
import net.azisaba.spicyAzisaBan.SABMessages.replaceVariables
import net.azisaba.spicyAzisaBan.SpicyAzisaBan
import net.azisaba.spicyAzisaBan.common.Actor
import net.azisaba.spicyAzisaBan.common.ChatColor
import net.azisaba.spicyAzisaBan.common.PlayerActor
import net.azisaba.spicyAzisaBan.common.title.Title
import net.azisaba.spicyAzisaBan.punishment.Punishment.Flags.Companion.toDatabase
Expand Down Expand Up @@ -557,7 +556,7 @@ data class Punishment(
}.thenDo { list ->
val message = SABMessages.Commands.General.samePunishmentAppliedToSameIPAddress
.replaceVariables(
"players" to "${ChatColor.RED}${list.joinToString("${ChatColor.YELLOW}, ${ChatColor.RED}") { it.name }}",
"players" to "<red>${list.joinToString("<yellow>, <red>") { it.name }}",
"players_count" to list.size.toString(),
)
.translate()
Expand Down

0 comments on commit 1b6e3da

Please sign in to comment.