MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / hasEnchantment

Method hasEnchantment

src/main/java/com/volmit/adapt/util/Items.java:140–142  ·  view source on GitHub ↗

Does the item have the given enchantment @param is the item @param e the enchantment @return true if it does

(ItemStack is, Enchantment e)

Source from the content-addressed store, hash-verified

138 * @return true if it does
139 */
140 public static boolean hasEnchantment(ItemStack is, Enchantment e) {
141 return is(is) && is.getEnchantments().containsKey(e);
142 }
143
144 /**
145 * Does the item have the enchantment at the given level

Callers

nothing calls this directly

Calls 1

isMethod · 0.95

Tested by

no test coverage detected