Only apply territoryShieldFactor when a player attacks
This commit is contained in:
parent
94006d8dc4
commit
45a8b7acd7
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user