From 3ed879ca18257dfee1f944f608517dc5741c2bcd Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 7 Feb 2012 15:04:20 -0600 Subject: [PATCH] "worldsIgnorePvP" setting no longer ignores PvP damage in SafeZones and PvP damage done by players who just logged in, no matter the world it happens in --- .../factions/listeners/FactionsEntityListener.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index 80fdf857..992f47e3 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -235,10 +235,6 @@ public class FactionsEntityListener implements Listener return true; Location defenderLoc = defender.getPlayer().getLocation(); - - if (Conf.worldsIgnorePvP.contains(defenderLoc.getWorld().getName())) - return true; - Faction defLocFaction = Board.getFactionAt(new FLocation(defenderLoc)); // for damage caused by projectiles, getDamager() returns the projectile... what we need to know is the source @@ -281,9 +277,13 @@ public class FactionsEntityListener implements Listener attacker.msg("You can't hurt other players while you are in "+(locFaction.isSafeZone() ? "a SafeZone." : "peaceful territory.")); return false; } - else if (locFaction.isWarZone() && Conf.warZoneFriendlyFire) + + if (locFaction.isWarZone() && Conf.warZoneFriendlyFire) return true; - + + if (Conf.worldsIgnorePvP.contains(defenderLoc.getWorld().getName())) + return true; + Faction defendFaction = defender.getFaction(); Faction attackFaction = attacker.getFaction();