Does the item have any enchantments @param is the item @return true if it does
(ItemStack is)
| 164 | * @return true if it does |
| 165 | */ |
| 166 | public static boolean hasEnchantments(ItemStack is) { |
| 167 | if (!is(is)) { |
| 168 | return false; |
| 169 | } |
| 170 | |
| 171 | return !is.getEnchantments().isEmpty(); |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Get a materialblock representation of this item |