From 01daaa7f235ae9ba9cb543713e55f9e6dfa869fe Mon Sep 17 00:00:00 2001 From: gingmzmzx <2417481092@qq.com> Date: Tue, 27 Aug 2024 21:01:58 +0800 Subject: [PATCH] feat: color in say message --- .../java/center/xzy/qb/messagesync/commands/impl/say.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/center/xzy/qb/messagesync/commands/impl/say.java b/src/main/java/center/xzy/qb/messagesync/commands/impl/say.java index 12f92c9..1ceb047 100644 --- a/src/main/java/center/xzy/qb/messagesync/commands/impl/say.java +++ b/src/main/java/center/xzy/qb/messagesync/commands/impl/say.java @@ -2,6 +2,7 @@ import center.xzy.qb.messagesync.Main; import center.xzy.qb.messagesync.commands.ICommand; +import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; @@ -18,9 +19,9 @@ public boolean onCommand(CommandSender sender, String[] args) { msg.append(arg).append(" "); } if (sender instanceof Player){ - Main.instance.getServer().broadcastMessage("<" + sender.getName() + "> " + msg); + Main.instance.getServer().broadcastMessage(ChatColor.YELLOW + "<" + sender.getName() + "> " + ChatColor.RESET + msg); }else { - Main.instance.getServer().broadcastMessage(plugin.getConfig().getString("say-prefix") + " " + msg); + Main.instance.getServer().broadcastMessage(ChatColor.YELLOW + plugin.getConfig().getString("say-prefix") + " " + ChatColor.RESET + msg); } return true; }