From 5e9f01ac570879f09c9df70dc90454a8af764051 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 12 Feb 2013 20:36:02 -0500 Subject: [PATCH] Fix party & admin chat not working right from console. --- .../nossr50/chat/commands/ChatCommand.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/chat/commands/ChatCommand.java b/src/main/java/com/gmail/nossr50/chat/commands/ChatCommand.java index 7a06ca25f..a66fe5bc7 100644 --- a/src/main/java/com/gmail/nossr50/chat/commands/ChatCommand.java +++ b/src/main/java/com/gmail/nossr50/chat/commands/ChatCommand.java @@ -29,26 +29,29 @@ public abstract class ChatCommand implements CommandExecutor { if (chatMode.isEnabled(mcMMOPlayer)) { disableChatMode(sender); - return true; + } + else { + enableChatMode(sender); } - enableChatMode(sender); return true; default: if (args.length == 1) { - if (!(sender instanceof Player)) { - return false; - } - - mcMMOPlayer = Users.getPlayer((Player) sender); - if (args[0].equalsIgnoreCase("on")) { + if (!(sender instanceof Player)) { + return false; + } + enableChatMode(sender); return true; } if (args[0].equalsIgnoreCase("off")) { + if (!(sender instanceof Player)) { + return false; + } + disableChatMode(sender); return true; }