Fix ItemFlags not working, fixes #626

This commit is contained in:
BuildTools 2019-01-13 02:35:33 -05:00
parent 6c1212b21f
commit b17d95678a

View File

@ -301,9 +301,8 @@ public class ItemUtil {
if (!lore.isEmpty()) {
meta.setLore(lore);
}
if (flags[0] != null && flags[0].toString().equals("")) {
for (String flag : flags) {
if (flag != null) {
if (flag != null && !flag.equals("")) {
try {
meta.addItemFlags(ItemFlag.valueOf(flag));
} catch (NullPointerException npe) {
@ -315,7 +314,6 @@ public class ItemUtil {
}
}
}
}
if (stack.getType().equals(Material.ENCHANTED_BOOK)) {
esmeta = (EnchantmentStorageMeta) meta;
for (Entry<Enchantment, Integer> e : stored.entrySet()) {