From 6d5f3a52f4ad7c2ef840d4f6b33f7da20eecef48 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 1 Nov 2013 09:30:10 -0400 Subject: [PATCH] Don't process chat if the mcMMOPlayer is null. The player should ALWAYS be online when chatting, but depending on external plugins and applications, this is not always properly implemented. Fixes #1578 --- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 37c02f1a5..74fdaa83e 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -619,6 +619,13 @@ public class PlayerListener implements Listener { } McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player, true); + + if (mcMMOPlayer == null) { + mcMMO.p.debug(player.getName() + "is chatting, but is currently not logged in to the server."); + mcMMO.p.debug("Party & Admin chat will not work properly for this player."); + return; + } + ChatManager chatManager = null; if (mcMMOPlayer.getPartyChatMode()) {