Check whether entityMeta is an instanceof ArmorStandMeta, instead of checking entity type

This commit is contained in:
BuildTools 2021-07-04 13:58:57 +08:00
parent efbb2b6338
commit 6a2846a9c6

View File

@ -134,7 +134,7 @@ public class BlockPlacementListener {
continue; continue;
// Marker Armor Stands should not prevent block placement // Marker Armor Stands should not prevent block placement
if(entity.getEntityType() == EntityType.ARMOR_STAND) { if(entity.getEntityMeta() instanceof ArmorStandMeta) {
ArmorStandMeta armorStandMeta = (ArmorStandMeta) entity.getEntityMeta(); ArmorStandMeta armorStandMeta = (ArmorStandMeta) entity.getEntityMeta();
if(armorStandMeta.isMarker()) { if(armorStandMeta.isMarker()) {
continue; continue;