Allow minecraft names instead of bukkit names for entities

This commit is contained in:
Brokkonaut
2022-09-09 07:47:12 +02:00
parent 0e601aa174
commit c34ad1ca0f

View File

@@ -946,6 +946,7 @@ public class BukkitUtils {
private static final HashMap<String, EntityType> types = new HashMap<>();
static {
for (EntityType t : EntityType.values()) {
if (t != EntityType.UNKNOWN) {
types.put(t.name().toLowerCase(), t);
@SuppressWarnings("deprecation")
String typeName = t.getName();
@@ -956,6 +957,9 @@ public class BukkitUtils {
if (ec != null) {
types.put(ec.getSimpleName().toLowerCase(), t);
}
types.put(t.getKey().getKey(), t);
types.put(t.getKey().toString(), t);
}
}
}