Prevent combat abilities from damaging allied players

This commit is contained in:
TfT_02 2014-02-28 22:08:48 +01:00
parent e56d5a0454
commit 34d6d867f2

View File

@ -506,7 +506,7 @@ public final class CombatUtils {
return false; 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; return false;
} }
@ -558,7 +558,7 @@ public final class CombatUtils {
if (tamer instanceof Player) { if (tamer instanceof Player) {
Player owner = (Player) tamer; Player owner = (Player) tamer;
return (owner == attacker || PartyManager.inSameParty(attacker, owner)); return (owner == attacker || PartyManager.inSameParty(attacker, owner) || PartyManager.areAllies(attacker, owner));
} }
} }