Fix party & admin chat not working right from console.

This commit is contained in:
GJ 2013-02-12 20:36:02 -05:00
parent ec718f04d7
commit 5e9f01ac57

View File

@ -29,26 +29,29 @@ public abstract class ChatCommand implements CommandExecutor {
if (chatMode.isEnabled(mcMMOPlayer)) { if (chatMode.isEnabled(mcMMOPlayer)) {
disableChatMode(sender); disableChatMode(sender);
return true; }
else {
enableChatMode(sender);
} }
enableChatMode(sender);
return true; return true;
default: default:
if (args.length == 1) { if (args.length == 1) {
if (args[0].equalsIgnoreCase("on")) {
if (!(sender instanceof Player)) { if (!(sender instanceof Player)) {
return false; return false;
} }
mcMMOPlayer = Users.getPlayer((Player) sender);
if (args[0].equalsIgnoreCase("on")) {
enableChatMode(sender); enableChatMode(sender);
return true; return true;
} }
if (args[0].equalsIgnoreCase("off")) { if (args[0].equalsIgnoreCase("off")) {
if (!(sender instanceof Player)) {
return false;
}
disableChatMode(sender); disableChatMode(sender);
return true; return true;
} }