Switch to Component for CommandSpy

This commit is contained in:
Telesphoreo 2022-08-02 18:57:12 -05:00
parent ed70a0ec8b
commit 09846f1d33

View File

@ -11,6 +11,8 @@ import java.util.Locale;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -33,7 +35,7 @@ public class CommandListener extends PlexListener
String command = event.getMessage();
if (!pl.getUniqueId().equals(player.getUniqueId()))
{
pl.sendMessage(ChatColor.GRAY + player.getName() + ": " + command);
pl.sendMessage(Component.text(player.getName() + ": " + command).color(NamedTextColor.GRAY));
}
});
}