Fixed detection damager(when attac by magic) http://redmine.sk89q.com/issues/901

This commit is contained in:
Rutr 2012-05-17 21:10:12 +02:00 committed by TomyLobo
parent 578eeff0e1
commit 8aa79d1c4c

View File

@ -181,7 +181,7 @@ private void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
} }
private void onEntityDamageByEntity(EntityDamageByEntityEvent event) { private void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
if (event.getCause() == DamageCause.PROJECTILE) { if (event.getDamager() instanceof Projectile) {
onEntityDamageByProjectile(event); onEntityDamageByProjectile(event);
return; return;
} }