mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Prevent combat abilities from damaging allied players
This commit is contained in:
parent
e56d5a0454
commit
34d6d867f2
@ -506,7 +506,7 @@ public final class CombatUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (PartyManager.inSameParty(player, defender) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
|
||||
if ((PartyManager.inSameParty(player, defender) || PartyManager.areAllies(player, defender)) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ public final class CombatUtils {
|
||||
if (tamer instanceof Player) {
|
||||
Player owner = (Player) tamer;
|
||||
|
||||
return (owner == attacker || PartyManager.inSameParty(attacker, owner));
|
||||
return (owner == attacker || PartyManager.inSameParty(attacker, owner) || PartyManager.areAllies(attacker, owner));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user