/** * Creates an instance by copying from the given {@link ItemMeta}. If that item is another * {@link LeatherArmorMeta}, its color is copied; otherwise, the new item is undyed. * @param meta the {@link ItemMeta} to copy */ public GlowMetaLeatherArmor(ItemMeta meta) { super(meta); if (meta instanceof LeatherArmorMeta) { color = ((LeatherArmorMeta) meta).getColor(); } }
@Override public MCColor getColor() { return BukkitMCColor.GetMCColor(lam.getColor()); }
skyMetaList.add(new SkyArmorColorMeta(((LeatherArmorMeta) itemMeta).getColor()));
public MaterialAndData(ItemStack item) { this.material = item.getType(); this.data = item.getDurability(); if (DefaultMaterials.isPlayerSkull(this)) { ItemMeta meta = item.getItemMeta(); Object profile = InventoryUtils.getSkullProfile(meta); extraData = new BlockSkull(profile); } else if (DefaultMaterials.isBanner(this.material)) { ItemMeta meta = item.getItemMeta(); if (meta != null && meta instanceof BannerMeta) { BannerMeta banner = (BannerMeta)meta; extraData = new BlockBanner(banner.getPatterns(), DeprecatedUtils.getBaseColor(banner)); } } else if (this.material == Material.LEATHER_BOOTS || this.material == Material.LEATHER_CHESTPLATE || this.material == Material.LEATHER_HELMET || this.material == Material.LEATHER_LEGGINGS) { ItemMeta meta = item.getItemMeta(); if (meta != null && meta instanceof LeatherArmorMeta) { extraData = new LeatherArmorData(((LeatherArmorMeta)meta).getColor()); } } else if (this.material == Material.POTION) { ItemMeta meta = item.getItemMeta(); if (meta != null && meta instanceof PotionMeta) { extraData = new PotionData(CompatibilityUtils.getColor((PotionMeta)meta)); } } }
Color color = armor.getColor(); key.setInt("armor.color", color.asRGB()); } else {
if (!color.check(armorMeta.getColor())) { return false;