Fixes NPE in MaterialConverter.

This commit is contained in:
Jeremy Wood 2019-01-30 08:53:40 -05:00 committed by GitHub
parent b1bf68a0ad
commit 5e067fa72d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ public class MaterialConverter {
*/
@Nullable
public static Material convertTypeString(@Nullable String value) {
IdMappings.Mapping mapping = IdMappings.getById(value);
IdMappings.Mapping mapping = IdMappings.getById(value != null ? value : "");
if (mapping != null) {
return Material.matchMaterial(mapping.getFlatteningType());
} else {