Fixed the Skeleton damage bug in protected regions

This commit is contained in:
DarkLiKally 2011-02-22 00:43:09 +01:00
parent 10c47eff7e
commit e84afb4808

View File

@ -152,6 +152,17 @@ public void onEntityDamageByProjectile(EntityDamageByProjectileEvent event) {
}
}
}
if (attacker != null && attacker instanceof Skeleton) {
if (plugin.useRegions) {
Vector pt = toVector(defender.getLocation());
if (!plugin.regionManager.getApplicableRegions(pt)
.allowsFlag(AreaFlags.FLAG_MOB_DAMAGE)) {
event.setCancelled(true);
return;
}
}
}
}
}