Only apply territoryShieldFactor when a player attacks

This commit is contained in:
BuildTools 2016-01-25 15:30:04 +01:00 committed by Olof Larsson
parent 94006d8dc4
commit 45a8b7acd7

View File

@ -1020,6 +1020,10 @@ public class EngineMain extends EngineAbstract
Player player = (Player)entity; Player player = (Player)entity;
MPlayer mplayer = MPlayer.get(player); 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 ... // ... and that player has a faction ...
if ( ! mplayer.hasFaction()) return; if ( ! mplayer.hasFaction()) return;