mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-26 12:05:45 +01:00
Fix NullPointerException when using air as material
This commit is contained in:
parent
96934a1087
commit
862acff45c
@ -275,6 +275,7 @@ public abstract class BaseConfigurableIcon implements Icon {
|
|||||||
// Then apply data from config nodes, overwriting NBT data if there are conflicting values
|
// Then apply data from config nodes, overwriting NBT data if there are conflicting values
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
|
|
||||||
|
if (itemMeta != null) {
|
||||||
itemMeta.setDisplayName(renderName(viewer));
|
itemMeta.setDisplayName(renderName(viewer));
|
||||||
itemMeta.setLore(renderLore(viewer));
|
itemMeta.setLore(renderLore(viewer));
|
||||||
|
|
||||||
@ -303,6 +304,7 @@ public abstract class BaseConfigurableIcon implements Icon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
itemStack.setItemMeta(itemMeta);
|
itemStack.setItemMeta(itemMeta);
|
||||||
|
}
|
||||||
|
|
||||||
if (enchantments != null) {
|
if (enchantments != null) {
|
||||||
enchantments.forEach(itemStack::addUnsafeEnchantment);
|
enchantments.forEach(itemStack::addUnsafeEnchantment);
|
||||||
|
Loading…
Reference in New Issue
Block a user