From 68b138949dc12e683aef930f95de7d863784f3bd Mon Sep 17 00:00:00 2001 From: thmsdy Date: Sat, 8 Feb 2020 13:44:47 -0600 Subject: [PATCH] Fixed console PM logging both headers --- .../com/fpghoti/fpchatx/command/commands/MessageCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fpghoti/fpchatx/command/commands/MessageCommand.java b/src/main/java/com/fpghoti/fpchatx/command/commands/MessageCommand.java index e2ce184..ce779c2 100644 --- a/src/main/java/com/fpghoti/fpchatx/command/commands/MessageCommand.java +++ b/src/main/java/com/fpghoti/fpchatx/command/commands/MessageCommand.java @@ -51,7 +51,8 @@ public class MessageCommand extends Commands { FPlayer.errMsg(p, Permission.noPerm); } }else { - String msg = ChatColor.GREEN + "PM from CONSOLE: " + ChatColor.GRAY; + String header = ChatColor.GREEN + "PM from CONSOLE: " + ChatColor.GRAY; + String msg = ""; String last = args[args.length - 1]; for(int i = 1; i < args.length - 1; i++) { msg = msg + args[i] + " "; @@ -62,7 +63,7 @@ public class MessageCommand extends Commands { if(target == null) { FPlayer.errMsg(null,"Invalid player."); }else { - target.sendMessage(msg); + target.sendMessage(header + msg); plugin.log(Level.INFO, ChatColor.GREEN + "PM to " + target.getName() + ": " + ChatColor.GRAY + msg); } }