Get Enchants from an ItemStack


#1

How can I get the Enchantments from an ItemStack?


#2
ItemStack stack;
List<Enchantment> enchantments = stack.get(Keys.ITEM_ENCHANTMENTS).get();