Fix for nullpointerexception.

This commit is contained in:
Brianna 2020-03-26 18:36:53 -04:00
parent 7eb4da7ee2
commit 4f644641a6

View File

@ -1677,7 +1677,11 @@ public enum CompatibleMaterial {
if (entityName.equals("ZOMBIE_PIGMAN")) {
return EntityType.PIG_ZOMBIE;
}
return EntityType.valueOf(entityName);
try {
return EntityType.valueOf(entityName);
} catch (IllegalArgumentException e) {
return null;
}
}
/**