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.isChatEnabled(ChatMode.PARTY)) {
Party party = mcMMOPlayer.getParty();
if (party == null) {
mcMMOPlayer.disableChat(ChatMode.PARTY);
player.sendMessage(LocaleLoader.getString("Commands.Party.None"));
return;
}
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.PARTY);
((PartyChatManager) chatManager).setParty(party);
}
else if (mcMMOPlayer.isChatEnabled(ChatMode.ADMIN)) {
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.ADMIN);
}
if (chatManager != null) {
chatManager.handleChat(player, event.getMessage(), event.isAsynchronous());
event.setCancelled(true);
}
}