Only apply territoryShieldFactor when a player attacks

This commit is contained in:
BuildTools authored and Olof Larsson committed 2016-01-25 15:37:22 +01:00
1 parent 94006d8dc4
commit 45a8b7acd7
1 file changed
+4
@@ -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;