Fixed colors not working in chat

This commit is contained in:
2022-05-30 22:10:54 +02:00
parent 7ab95e437a
commit 40a6e6bcc9
5 changed files with 26 additions and 21 deletions
@@ -9,17 +9,17 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Message implements CommandExecutor {
public class Message implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player player)) {
return true;
}
ChatUser user = ChatUserManager.getChatUser(player.getUniqueId());
user.setReplyContinueTarget(args[0]);
if(args.length < 2) return false; // todo error message or command info
ChatUser user = ChatUserManager.getChatUser(player.getUniqueId());
user.setReplyContinueTarget(args[0]);
String message = StringUtils.join(args, " ", 1, args.length);
ChatPlugin.getInstance().getChatHandler().privateMessage(player, args[0], message);
return false;