Add fallback to metaindex to living entity.

This commit is contained in:
Myles 2016-04-30 20:40:09 +01:00
parent e595344941
commit fb4bc397c6

View File

@ -157,7 +157,7 @@ public enum MetaIndex {
}
public static MetaIndex getIndex(EntityType type, int index) {
Class<? extends org.bukkit.entity.Entity> entityClass = type.getEntityClass();
Class<? extends org.bukkit.entity.Entity> entityClass = type == null ? LivingEntity.class : type.getEntityClass();
if (entityClass == null) {
System.out.println("Could not get entity class for " + type);
return null;