From 6feb824940c9b06a8e8ab921b43ec3c7ed294913 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 4 Feb 2011 20:58:21 -0800 Subject: [PATCH] Bug Fix: Players not in a party would cause a null pointer exception during a pvp kill. --- mcMMO/com/bukkit/nossr50/mcMMO/mcEntityListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcMMO/com/bukkit/nossr50/mcMMO/mcEntityListener.java b/mcMMO/com/bukkit/nossr50/mcMMO/mcEntityListener.java index 73f81dd6c..7868add91 100644 --- a/mcMMO/com/bukkit/nossr50/mcMMO/mcEntityListener.java +++ b/mcMMO/com/bukkit/nossr50/mcMMO/mcEntityListener.java @@ -25,9 +25,9 @@ public class mcEntityListener extends EntityListener { //If defender is player if(x instanceof Player){ Player defender = (Player)x; - if(mcUsers.getProfile(defender).getParty().equals(mcUsers.getProfile(attacker).getParty())){ + if(mcUsers.getProfile(defender).inParty() && mcUsers.getProfile(defender).getParty().equals(mcUsers.getProfile(attacker).getParty())) event.setCancelled(true); - } + if(mcUsers.getProfile(defender).isDead()) return; if((defender.getHealth() - event.getDamage()) <= 0){