Fixed issue with 1.7 entity damage event

This commit is contained in:
DroppingAnvil 2019-10-27 15:32:52 -05:00
parent d57f3b6f01
commit 63cfe61826

View File

@ -139,7 +139,7 @@ public class FactionsEntityListener implements Listener {
} }
} else { } else {
// Protect armor stands/item frames from being damaged in protected territories // Protect armor stands/item frames from being damaged in protected territories
if (damagee.getType() == EntityType.ITEM_FRAME || damagee.getType() == EntityType.ARMOR_STAND) { if (damagee.getType() == EntityType.ITEM_FRAME || damagee.getType().name().equals("armor_stand")) {
// Manage projectiles launched by players // Manage projectiles launched by players
if (damager instanceof Projectile && ((Projectile) damager).getShooter() instanceof Entity) { if (damager instanceof Projectile && ((Projectile) damager).getShooter() instanceof Entity) {
damager = (Entity) ((Projectile) damager).getShooter(); damager = (Entity) ((Projectile) damager).getShooter();