forked from LogBlock/LogBlock
Allow minecraft names instead of bukkit names for entities
This commit is contained in:
@@ -946,6 +946,7 @@ public class BukkitUtils {
|
|||||||
private static final HashMap<String, EntityType> types = new HashMap<>();
|
private static final HashMap<String, EntityType> types = new HashMap<>();
|
||||||
static {
|
static {
|
||||||
for (EntityType t : EntityType.values()) {
|
for (EntityType t : EntityType.values()) {
|
||||||
|
if (t != EntityType.UNKNOWN) {
|
||||||
types.put(t.name().toLowerCase(), t);
|
types.put(t.name().toLowerCase(), t);
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
String typeName = t.getName();
|
String typeName = t.getName();
|
||||||
@@ -956,6 +957,9 @@ public class BukkitUtils {
|
|||||||
if (ec != null) {
|
if (ec != null) {
|
||||||
types.put(ec.getSimpleName().toLowerCase(), t);
|
types.put(ec.getSimpleName().toLowerCase(), t);
|
||||||
}
|
}
|
||||||
|
types.put(t.getKey().getKey(), t);
|
||||||
|
types.put(t.getKey().toString(), t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user