Package org.spout.nbt

Examples of org.spout.nbt.CompoundMap.containsKey()


   * @param item Item to check
   * @return true if the item contains any enchantment
   */
  public static boolean isEnchanted(ItemStack item) {
    CompoundMap nbtData = item.getNBTData();
    return nbtData != null && nbtData.containsKey("ench") && nbtData.get("ench") instanceof ListTag<?>;
  }

  /**
   * An object holding both the type of {@link Enchantment} as well as its power level (I, II, III, IV, V)
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.