From 6db9e247b7c75a991886c8c74122f3605a6c0a8c Mon Sep 17 00:00:00 2001 From: Daniel Naylor Date: Mon, 11 Mar 2013 21:01:45 +0000 Subject: [PATCH] Fixing case where /party chat (on|off) would throw a NullPointerException --- Changelog.txt | 1 + .../java/com/gmail/nossr50/commands/chat/ChatCommand.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index d7f8593db..04e065438 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -28,6 +28,7 @@ Version 1.4.03-dev = Fixed bug where the 'mcmmo.commands.ptp.world.all' was registered twice = Fixed bug where Beast Lore wouldn't work on friendly pets = Fixed bug where Deflect was calculated based on the attacker, not the defender. (We really did this time!) + = Fixed bug where /party chat (on|off) would not work ! Moved the Salvage unlock level from config.yml to advanced.yml ! Changed how Chimaera Wings are acquired, you need to craft them now. (By default, use 5 feathers in a shapeless recipe) - Removed option to disable Salvage via the config file. This should be handled via permissions instead. diff --git a/src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java b/src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java index 89372157e..9e1a8810d 100644 --- a/src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java @@ -42,6 +42,8 @@ public abstract class ChatCommand implements CommandExecutor { return false; } + mcMMOPlayer = UserManager.getPlayer((Player) sender); + enableChatMode(sender); return true; } @@ -51,6 +53,8 @@ public abstract class ChatCommand implements CommandExecutor { return false; } + mcMMOPlayer = UserManager.getPlayer((Player) sender); + disableChatMode(sender); return true; }