Merge from DroppingAnvil/1.6.x

Fixed issue with 1.7 entity damage event
This commit is contained in:
DroppingAnvil 2019-10-27 13:35:05 -07:00 committed by GitHub
commit 77245e716f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ public class FactionsEntityListener implements Listener {
}
} else {
// 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
if (damager instanceof Projectile && ((Projectile) damager).getShooter() instanceof Entity) {
damager = (Entity) ((Projectile) damager).getShooter();