mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-26 20:26:34 +01:00
Fixed npe in BiomeIcon
This commit is contained in:
parent
4448dd2a6f
commit
619781eff9
@ -32,7 +32,11 @@ public class BiomeIcon {
|
||||
}
|
||||
byte tempData = (byte) biomeConfig.getInt("Biomes." + biome.name() + ".DisplayItem.Data", 0);
|
||||
|
||||
this.displayItem = CompatibleMaterial.getMaterial(tempMat.getMaterial(), tempData).getItem();
|
||||
CompatibleMaterial displayMaterial = CompatibleMaterial.getMaterial(tempMat.getMaterial(), tempData);
|
||||
if(displayMaterial == null) {
|
||||
displayMaterial = CompatibleMaterial.STONE;
|
||||
}
|
||||
this.displayItem = displayMaterial.getItem();
|
||||
ItemMeta im = displayItem.getItemMeta();
|
||||
if(im != null){
|
||||
im.setDisplayName(ChatColor.translateAlternateColorCodes('&', biomeConfig.getString("Biomes." + biome.name() + ".DisplayName", biome.name())));
|
||||
|
Loading…
Reference in New Issue
Block a user