mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Bug Fix: Players not in a party would cause a null pointer exception during a pvp kill.
This commit is contained in:
parent
18bc3fec4a
commit
6feb824940
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user