Skip to content

Commit

Permalink
feat: color in say message
Browse files Browse the repository at this point in the history
  • Loading branch information
Gingmzmzx committed Aug 27, 2024
1 parent 4e067c7 commit 01daaa7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 01daaa7

Please sign in to comment.