From 1b6e3da32667203e108533392436650e8a9880ed Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Tue, 3 Dec 2024 15:19:02 +0900 Subject: [PATCH] fix: use MiniMessage instead of legacy formatting --- README.md | 4 +++- .../azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt | 8 ++++---- .../net/azisaba/spicyAzisaBan/punishment/Punishment.kt | 3 +-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e2f79d7..7fe228a 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt index ad45da5..8aa18ca 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt @@ -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) "" else ""}$s" } else { if (isLast) { - "§a$s" + "$s" } else { - "§e$s" + "$s" } } - }.joinToString("§7 -> ").let { actor.send(it) } + }.joinToString(" -> ").let { actor.send(it) } } } .catch { actor.sendErrorMessage(it) } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/punishment/Punishment.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/punishment/Punishment.kt index bee5218..2d67d42 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/punishment/Punishment.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/punishment/Punishment.kt @@ -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 @@ -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 "${list.joinToString(", ") { it.name }}", "players_count" to list.size.toString(), ) .translate()