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

Method hasEnchantments

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

Does the item have any enchantments @param is the item @return true if it does

(ItemStack is)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

isMethod · 0.95
isEmptyMethod · 0.80

Tested by

no test coverage detected