mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Only run EntityListener#checkParties on EntityDamageByEntityEvent if Parties are enabled
This commit is contained in:
parent
f6facbc08b
commit
1c1781cee7
@ -365,7 +365,7 @@ public class EntityListener implements Listener {
|
||||
if(attacker instanceof Projectile projectile) {
|
||||
if(projectile.getShooter() instanceof Player attackingPlayer && !attackingPlayer.equals(defendingPlayer)) {
|
||||
//Check for party friendly fire and cancel the event
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer)) {
|
||||
if (mcMMO.p.getPartyConfig().isPartyEnabled() && checkParties(event, defendingPlayer, attackingPlayer)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -383,7 +383,7 @@ public class EntityListener implements Listener {
|
||||
}
|
||||
}
|
||||
} else if (attacker instanceof Player attackingPlayer){
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer))
|
||||
if (mcMMO.p.getPartyConfig().isPartyEnabled() && checkParties(event, defendingPlayer, attackingPlayer))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user