"disablePVPForFactionlessPlayers" is now overridden if "warZoneFriendlyFire" is enabled and the PvP is occurring inside a War Zone

This commit is contained in:
Brettflan 2011-08-01 18:28:34 -05:00
parent 2154b89005
commit ad2bb5f4d0

View File

@ -173,15 +173,6 @@ public class FactionsEntityListener extends EntityListener {
return true; return true;
} }
if (!attacker.hasFaction() && Conf.disablePVPForFactionlessPlayers) {
attacker.sendMessage("You can't hurt other players until you join a faction.");
return false;
}
else if (!defender.hasFaction() && Conf.disablePVPForFactionlessPlayers) {
attacker.sendMessage("You can't hurt players who are not currently in a faction.");
return false;
}
if (attacker.hasLoginPvpDisabled()) { if (attacker.hasLoginPvpDisabled()) {
attacker.sendMessage("You can't hurt other players for " + Conf.noPVPDamageToOthersForXSecondsAfterLogin + " seconds after logging in."); attacker.sendMessage("You can't hurt other players for " + Conf.noPVPDamageToOthersForXSecondsAfterLogin + " seconds after logging in.");
return false; return false;
@ -198,6 +189,15 @@ public class FactionsEntityListener extends EntityListener {
return true; return true;
} }
if (!attacker.hasFaction() && Conf.disablePVPForFactionlessPlayers) {
attacker.sendMessage("You can't hurt other players until you join a faction.");
return false;
}
else if (!defender.hasFaction() && Conf.disablePVPForFactionlessPlayers) {
attacker.sendMessage("You can't hurt players who are not currently in a faction.");
return false;
}
Relation relation = defender.getRelation(attacker); Relation relation = defender.getRelation(attacker);
// You can not hurt neutral factions // You can not hurt neutral factions