1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-06-19 07:21:26 +02:00

Patching more NPEs involving invbalid players, plus mob health bars.

This commit is contained in:
Glitchfinder 2013-05-13 18:39:16 -07:00
parent ed5a43966d
commit 7550b99aaa
2 changed files with 8 additions and 1 deletions
src/main/java/com/gmail/nossr50

@ -427,6 +427,10 @@ public class PlayerListener implements Listener {
ItemStack heldItem = player.getItemInHand();
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (mcMMOPlayer == null) {
return;
}
switch (event.getAction()) {
case RIGHT_CLICK_BLOCK:
Block block = event.getClickedBlock();

@ -46,7 +46,10 @@ public final class MobHealthbarUtils {
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
if (profile.getMobHealthbarType() == MobHealthbarType.DISABLED) {
if (profile == null) {
return;
}
else if (profile.getMobHealthbarType() == MobHealthbarType.DISABLED) {
return;
}