From 45a8b7acd7aa90fd78e7666672cceb767f506b7f Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 25 Jan 2016 15:30:04 +0100 Subject: [PATCH] Only apply territoryShieldFactor when a player attacks --- src/com/massivecraft/factions/engine/EngineMain.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/massivecraft/factions/engine/EngineMain.java b/src/com/massivecraft/factions/engine/EngineMain.java index 4054d17d..d7f02ad0 100644 --- a/src/com/massivecraft/factions/engine/EngineMain.java +++ b/src/com/massivecraft/factions/engine/EngineMain.java @@ -1020,6 +1020,10 @@ public class EngineMain extends EngineAbstract Player player = (Player)entity; MPlayer mplayer = MPlayer.get(player); + // ... and the attacker is a player ... + Entity attacker = MUtil.getLiableDamager(event); + if (! (attacker instanceof Player)) return; + // ... and that player has a faction ... if ( ! mplayer.hasFaction()) return;