From 27daa3a8581540338fc40ebbaa4956f54d289676 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Fri, 25 Feb 2022 02:08:46 -0600 Subject: [PATCH] ee --- src/main/java/dev/plex/command/impl/AdminChatCMD.java | 2 -- src/main/java/dev/plex/command/impl/TagCMD.java | 3 ++- src/main/java/dev/plex/listener/impl/AdminListener.java | 2 -- src/main/java/dev/plex/listener/impl/BanListener.java | 2 -- src/main/java/dev/plex/menu/PunishedPlayerMenu.java | 2 -- src/main/java/dev/plex/util/PlexUtils.java | 6 ------ 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/dev/plex/command/impl/AdminChatCMD.java b/src/main/java/dev/plex/command/impl/AdminChatCMD.java index 939bb83..6434d94 100644 --- a/src/main/java/dev/plex/command/impl/AdminChatCMD.java +++ b/src/main/java/dev/plex/command/impl/AdminChatCMD.java @@ -8,8 +8,6 @@ import dev.plex.listener.impl.ChatListener; import dev.plex.rank.enums.Rank; import net.kyori.adventure.text.Component; import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/dev/plex/command/impl/TagCMD.java b/src/main/java/dev/plex/command/impl/TagCMD.java index 133bb02..c454998 100644 --- a/src/main/java/dev/plex/command/impl/TagCMD.java +++ b/src/main/java/dev/plex/command/impl/TagCMD.java @@ -7,6 +7,7 @@ import dev.plex.command.annotation.CommandPermissions; import dev.plex.command.source.RequiredCommandSource; import dev.plex.player.PlexPlayer; import dev.plex.rank.enums.Rank; +import dev.plex.util.PlexUtils; import net.kyori.adventure.text.Component; import org.apache.commons.lang.StringUtils; import org.bukkit.ChatColor; @@ -50,7 +51,7 @@ public class TagCMD extends PlexCommand return messageComponent("maximumPrefixLength", plugin.config.getInt("chat.max-tag-length", 16)); } player.setPrefix(prefix); - return messageComponent("prefixSetTo", prefix); + return messageComponent("prefixSetTo", PlexUtils.colorize(prefix)); } if (args[0].equalsIgnoreCase("clear")) diff --git a/src/main/java/dev/plex/listener/impl/AdminListener.java b/src/main/java/dev/plex/listener/impl/AdminListener.java index 582f500..67c5005 100644 --- a/src/main/java/dev/plex/listener/impl/AdminListener.java +++ b/src/main/java/dev/plex/listener/impl/AdminListener.java @@ -9,9 +9,7 @@ import dev.plex.player.PlexPlayer; import dev.plex.rank.enums.Rank; import dev.plex.util.PlexUtils; import org.bukkit.event.EventHandler; - import static dev.plex.util.PlexUtils.messageComponent; -import static dev.plex.util.PlexUtils.messageString; public class AdminListener extends PlexListener { diff --git a/src/main/java/dev/plex/listener/impl/BanListener.java b/src/main/java/dev/plex/listener/impl/BanListener.java index 5ece38a..92ced77 100644 --- a/src/main/java/dev/plex/listener/impl/BanListener.java +++ b/src/main/java/dev/plex/listener/impl/BanListener.java @@ -7,9 +7,7 @@ import dev.plex.punishment.PunishmentType; import dev.plex.util.MojangUtils; import dev.plex.util.PlexUtils; import java.time.format.DateTimeFormatter; - import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.event.EventHandler; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; diff --git a/src/main/java/dev/plex/menu/PunishedPlayerMenu.java b/src/main/java/dev/plex/menu/PunishedPlayerMenu.java index a74665a..4ee0c3e 100644 --- a/src/main/java/dev/plex/menu/PunishedPlayerMenu.java +++ b/src/main/java/dev/plex/menu/PunishedPlayerMenu.java @@ -5,10 +5,8 @@ import dev.plex.cache.PlayerCache; import dev.plex.player.PunishedPlayer; import dev.plex.punishment.Punishment; import dev.plex.util.menu.AbstractMenu; -import java.util.Arrays; import java.util.Collections; import java.util.List; - import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; diff --git a/src/main/java/dev/plex/util/PlexUtils.java b/src/main/java/dev/plex/util/PlexUtils.java index 7efd5c9..8951cb2 100644 --- a/src/main/java/dev/plex/util/PlexUtils.java +++ b/src/main/java/dev/plex/util/PlexUtils.java @@ -22,7 +22,6 @@ import java.util.stream.Collectors; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; -import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -108,11 +107,6 @@ public class PlexUtils extends PlexBase return false; } - public static String color(String s) - { - return ChatColor.translateAlternateColorCodes('&', s); - } - public static String colorize(final String string) { return ChatColor.translateAlternateColorCodes('&', string);