Permalink
Browse files

Return null if the material is null.

  • Loading branch information...
me4502 committed Oct 4, 2018
1 parent 7961fa5 commit 79a41210982c92dfaf49ea5bb4602ef81398bc03
@@ -38,8 +38,11 @@
@Nullable
@Override
public BlockMaterial getMaterial(BlockType blockType) {
return materialMap.computeIfAbsent(BukkitAdapter.adapt(blockType),
material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(blockType), material));
Material mat = BukkitAdapter.adapt(blockType);
if (mat == null) {
return null;
}
return materialMap.computeIfAbsent(mat, material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(blockType), material));
}
@Nullable

0 comments on commit 79a4121

Please sign in to comment.