From 6f3248eefa1eb0f7d7e6de2f56be47ba5b3ec56c Mon Sep 17 00:00:00 2001 From: Maxlego08 Date: Sat, 10 Aug 2024 19:39:48 +0200 Subject: [PATCH] :memo: Fixs --- dependency-reduced-pom.xml | 6 +++++- pom.xml | 6 +++++- src/fr/maxlego08/koth/ZKoth.java | 2 +- src/fr/maxlego08/koth/hook/teams/UltimateClan.java | 3 ++- src/fr/maxlego08/koth/zcore/utils/ZUtils.java | 3 +++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml index bc8d21a..fa7a2a1 100644 --- a/dependency-reduced-pom.xml +++ b/dependency-reduced-pom.xml @@ -68,6 +68,10 @@ com.cryptomorin.xseries fr.maxlego08.koth.xseries + + fr.mrmicky.fastboard + fr.maxlego08.koth.fastboard + @@ -187,7 +191,7 @@ com.github.UlrichBR UClansV7-API - 7.7.0-r1 + 7.13.0-R1 provided diff --git a/pom.xml b/pom.xml index 00cb335..10485b9 100644 --- a/pom.xml +++ b/pom.xml @@ -74,6 +74,10 @@ com.cryptomorin.xseries fr.maxlego08.koth.xseries + + fr.mrmicky.fastboard + fr.maxlego08.koth.fastboard + @@ -150,7 +154,7 @@ fr.mrmicky fastboard - 2.0.2 + 2.1.3 com.github.booksaw diff --git a/src/fr/maxlego08/koth/ZKoth.java b/src/fr/maxlego08/koth/ZKoth.java index ba2fbeb..5e8d6ed 100644 --- a/src/fr/maxlego08/koth/ZKoth.java +++ b/src/fr/maxlego08/koth/ZKoth.java @@ -785,7 +785,7 @@ public class ZKoth extends ZUtils implements Koth { string = string.replace("%centerY%", String.valueOf(centerLocation.getBlockY())); string = string.replace("%centerZ%", String.valueOf(centerLocation.getBlockZ())); - return ColorTransformer.transformColors(string); + return string; } @Override diff --git a/src/fr/maxlego08/koth/hook/teams/UltimateClan.java b/src/fr/maxlego08/koth/hook/teams/UltimateClan.java index 18b14c5..e828d79 100644 --- a/src/fr/maxlego08/koth/hook/teams/UltimateClan.java +++ b/src/fr/maxlego08/koth/hook/teams/UltimateClan.java @@ -2,6 +2,7 @@ package fr.maxlego08.koth.hook.teams; import fr.maxlego08.koth.KothPlugin; import fr.maxlego08.koth.api.KothTeam; +import fr.maxlego08.koth.zcore.utils.ColorTransformer; import me.ulrich.clans.Clans; import me.ulrich.clans.data.ClanData; import me.ulrich.clans.events.ClanDeleteEvent; @@ -28,7 +29,7 @@ public class UltimateClan implements KothTeam { @Override public String getTeamName(OfflinePlayer player) { Optional optional = this.clans.getPlayerAPI().getPlayerClan(player.getUniqueId()); - return optional.isPresent() ? optional.get().getTag() : player.getName(); + return optional.isPresent() ? ColorTransformer.transformColors(optional.get().getTag()) : player.getName(); } @Override diff --git a/src/fr/maxlego08/koth/zcore/utils/ZUtils.java b/src/fr/maxlego08/koth/zcore/utils/ZUtils.java index 8e3262e..886f6b4 100644 --- a/src/fr/maxlego08/koth/zcore/utils/ZUtils.java +++ b/src/fr/maxlego08/koth/zcore/utils/ZUtils.java @@ -540,6 +540,9 @@ public abstract class ZUtils extends MessageUtils { */ protected String color(String message) { if (message == null) return null; + + message = ColorTransformer.transformColors(message); + if (NmsVersion.nmsVersion.isHexVersion()) { Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}"); Matcher matcher = pattern.matcher(message);