mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Return null if the material is null.
This commit is contained in:
parent
7961fa5891
commit
79a4121098
@ -38,8 +38,11 @@ public class BukkitBlockRegistry extends BundledBlockRegistry {
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public BlockMaterial getMaterial(BlockType blockType) {
|
public BlockMaterial getMaterial(BlockType blockType) {
|
||||||
return materialMap.computeIfAbsent(BukkitAdapter.adapt(blockType),
|
Material mat = BukkitAdapter.adapt(blockType);
|
||||||
material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(blockType), material));
|
if (mat == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return materialMap.computeIfAbsent(mat, material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(blockType), material));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user