use of pl.themolka.arcade.item.ItemEnchantment in project Arcade2 by ShootGame.
the class EnchantmentStorageMetaParser method parse.
@Override
public EnchantmentStorageMeta parse(Node root, ItemStack itemStack, EnchantmentStorageMeta itemMeta) throws ParserException {
Node node = root.firstChild("enchanted-book");
if (node != null) {
for (Node enchantment : node.children("enchantment")) {
ItemEnchantment value = this.enchantmentParser.parse(enchantment).orFail();
itemMeta.addStoredEnchant(value.getType(), value.getLevel(), true);
}
}
return itemMeta;
}
Aggregations