Skip to content
Permalink
Browse files

Actually implement sentinel fightback, fixes #23

  • Loading branch information...
mcmonkey4eva committed Apr 26, 2016
1 parent 59ffb8c commit 0e29acea5b1e6303b7d64fc9d11c5e76d20696e2
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
@@ -224,12 +224,12 @@ public void whenAttacksHappened(EntityDamageByEntityEvent event) {
if (isMe) {
stats_damageTaken += event.getFinalDamage();
}
if (event.getDamager() instanceof LivingEntity) {
if (fightback && event.getDamager() instanceof LivingEntity) {
currentTargets.add(event.getDamager().getUniqueId());
}
else if (event.getDamager() instanceof Projectile) {
ProjectileSource source = ((Projectile) event.getDamager()).getShooter();
if (source instanceof LivingEntity) {
if (fightback && source instanceof LivingEntity) {
currentTargets.add(((LivingEntity) source).getUniqueId());
}
}

0 comments on commit 0e29ace

Please sign in to comment.
You can’t perform that action at this time.