mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06: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 defender is player
|
||||||
if(x instanceof Player){
|
if(x instanceof Player){
|
||||||
Player defender = (Player)x;
|
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);
|
event.setCancelled(true);
|
||||||
}
|
|
||||||
if(mcUsers.getProfile(defender).isDead())
|
if(mcUsers.getProfile(defender).isDead())
|
||||||
return;
|
return;
|
||||||
if((defender.getHealth() - event.getDamage()) <= 0){
|
if((defender.getHealth() - event.getDamage()) <= 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user