From 1c1781cee7a517669b65fcb13799f956e4a7754b Mon Sep 17 00:00:00 2001 From: Dieu Date: Wed, 21 Feb 2024 19:23:10 +0100 Subject: [PATCH] Only run EntityListener#checkParties on EntityDamageByEntityEvent if Parties are enabled --- src/main/java/com/gmail/nossr50/listeners/EntityListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 17ef40e08..8076fc1fd 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -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; } }