1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-04-02 09:46:24 +02:00

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 
This commit is contained in:
GJ 2013-11-01 09:30:10 -04:00
parent 2cdf08de9f
commit 6d5f3a52f4

@ -619,6 +619,13 @@ public class PlayerListener implements Listener {
} }
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player, true); 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; ChatManager chatManager = null;
if (mcMMOPlayer.getPartyChatMode()) { if (mcMMOPlayer.getPartyChatMode()) {