From 9ce4dc6f3ad83b83a5144b44cc4f3f506dae58b2 Mon Sep 17 00:00:00 2001 From: Allink Date: Tue, 25 Jul 2023 00:21:41 +0100 Subject: [PATCH] Fix CommandSpy colours --- .../java/me/totalfreedom/totalfreedommod/CommandSpy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/CommandSpy.java b/src/main/java/me/totalfreedom/totalfreedommod/CommandSpy.java index 5d2730d6..bc4989cf 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/CommandSpy.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/CommandSpy.java @@ -1,7 +1,7 @@ package me.totalfreedom.totalfreedommod; import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.event.ClickEvent; +import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerCommandPreprocessEvent; @@ -23,7 +23,7 @@ public class CommandSpy extends FreedomService { server.getOnlinePlayers().stream().filter(player -> plugin.al.isAdmin(player) && plugin.al.getAdmin(player).getCommandSpy() && player != event.getPlayer()).forEach(player -> - player.sendMessage(Component.text(event.getPlayer().getName()).append(Component.text(": ")) - .append(Component.text(event.getMessage())))); + player.sendMessage(Component.text(event.getPlayer().getName(), NamedTextColor.GRAY).append(Component.text(": ", NamedTextColor.GRAY)) + .append(Component.text(event.getMessage(), NamedTextColor.GRAY)))); } } \ No newline at end of file