From ad2bb5f4d0a6f94c635d9c689c29201b1d617f15 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Mon, 1 Aug 2011 18:28:34 -0500 Subject: [PATCH] "disablePVPForFactionlessPlayers" is now overridden if "warZoneFriendlyFire" is enabled and the PvP is occurring inside a War Zone --- .../listeners/FactionsEntityListener.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index d3b76fd3..3c4e41de 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -173,15 +173,6 @@ public class FactionsEntityListener extends EntityListener { 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()) { attacker.sendMessage("You can't hurt other players for " + Conf.noPVPDamageToOthersForXSecondsAfterLogin + " seconds after logging in."); return false; @@ -198,6 +189,15 @@ public class FactionsEntityListener extends EntityListener { 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); // You can not hurt neutral factions