Fix Unions-OG null prefixes

This commit is contained in:
NotAlexNoyle committed 2026-05-04 15:42:40 -04:00
1 parent 4db8042cf6
commit b58122072d
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -192,7 +192,7 @@ internal class Events : Listener {
var nameString = "${PlayerAffix.getPrefix(event.player.uniqueId)}${event.player.name}"
val unionColorTag = PlaceholderAPI.setPlaceholders(event.player, "%simpleclans_union_color_tag%")
if (unionColorTag.isNotEmpty() && unionColorTag != "None") {
if (unionColorTag.isNotEmpty() && unionColorTag != "&8None") {
nameString = "&8[$unionColorTag&8] $nameString"
}
val nameComponent = UtilitiesOG.trueogColorize(legacyToMm(nameString))
@@ -142,9 +142,9 @@ internal class TranslateMessage : CommandExecutor {
"${PlayerAffix.getPrefix(sentChatMessage.player.uniqueId)}${sentChatMessage.player.name} ${
PlayerAffix.getSuffix(sentChatMessage.player.uniqueId)
}"
val clanColorTag = PlaceholderAPI.setPlaceholders(sentMessage.player, "%simpleclans_clan_color_tag%")
if (clanColorTag.isNotEmpty() && clanColorTag != "None") {
playerString = "&8[$clanColorTag&8] $playerString"
val unionColorTag = PlaceholderAPI.setPlaceholders(sentMessage.player, "%simpleclans_clan_color_tag%")
if (unionColorTag.isNotEmpty() && unionColorTag != "&8None") {
playerString = "&8[$unionColorTag&8] $playerString"
}
val playerComponent =
UtilitiesOG.trueogColorize(
@@ -29,9 +29,9 @@ internal object ChatUtil {
fun getPlayerPartString(player: Player): String {
var playerPart = "${PlayerAffix.getPrefix(player.uniqueId)}${player.name}"
val clanColorTag = PlaceholderAPI.setPlaceholders(player, "%simpleclans_clan_color_tag%")
if (clanColorTag.isNotEmpty() && clanColorTag != "None") {
playerPart = "&8[$clanColorTag&8] $playerPart"
val unionColorTag = PlaceholderAPI.setPlaceholders(player, "%simpleclans_clan_color_tag%")
if (unionColorTag.isNotEmpty() && unionColorTag != "&8None") {
playerPart = "&8[$unionColorTag&8] $playerPart"
}
return playerPart