mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	CombatUtils: Don't run checks against party features if parties are disabled (#5005)
Co-authored-by: Dieu <info@l4b.org>
This commit is contained in:
		@@ -968,8 +968,10 @@ public final class CombatUtils {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if ((mcMMO.p.getPartyManager().inSameParty(player, defender) || mcMMO.p.getPartyManager().areAllies(player, defender)) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
 | 
			
		||||
                return false;
 | 
			
		||||
            if(mcMMO.p.getPartyConfig().isPartyEnabled()) {
 | 
			
		||||
                if ((mcMMO.p.getPartyManager().inSameParty(player, defender) || mcMMO.p.getPartyManager().areAllies(player, defender)) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Vanished players should not be able to get hit by AoE effects
 | 
			
		||||
@@ -1019,7 +1021,7 @@ public final class CombatUtils {
 | 
			
		||||
 | 
			
		||||
            if (tamer instanceof Player owner) {
 | 
			
		||||
 | 
			
		||||
                return (owner == attacker || mcMMO.p.getPartyManager().inSameParty(attacker, owner) || mcMMO.p.getPartyManager().areAllies(attacker, owner));
 | 
			
		||||
                return (owner == attacker || (mcMMO.p.getPartyConfig().isPartyEnabled() && (mcMMO.p.getPartyManager().inSameParty(attacker, owner) || mcMMO.p.getPartyManager().areAllies(attacker, owner))));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user