@Override public void setLeggings(ItemStack itemStack) { holder.setLeggings(itemStack); }
@Override public void setLeggings(ItemStack arg0) { entity.setLeggings(arg0); }
@Override public void setLeggings(MCItemStack item) { as.setLeggings(item == null ? null : ((BukkitMCItemStack) item).asItemStack()); }
@Override public void setArmorContents(ItemStack[] arg0) { entity.setHelmet(arg0[EquipmentSlot.HELMET.index - 1]); entity.setChestplate(arg0[EquipmentSlot.CHESTPLATE.index - 1]); entity.setLeggings(arg0[EquipmentSlot.LEGGINGS.index - 1]); entity.setBoots(arg0[EquipmentSlot.BOOTS.index - 1]); }
@Override public void clear() { entity.setItemInHand(null); entity.setChestplate(null); entity.setHelmet(null); entity.setBoots(null); entity.setLeggings(null); }
@Override public SpellResult step(CastContext context) { SpellResult result = super.step(context); if (entity == null) { return SpellResult.FAIL; } ArmorStand armorStand = (ArmorStand)entity; update(armorStand); if (stepCount == visibleDelayTicks) { armorStand.setItemInHand(rightArmItem); armorStand.setHelmet(helmetItem); armorStand.setChestplate(chestplateItem); armorStand.setLeggings(leggingsItem); armorStand.setBoots(bootsItem); } stepCount++; return result; }
@Override public void apply(Entity entity) { if (!(entity instanceof ArmorStand)) return; ArmorStand armorStand = (ArmorStand)entity; armorStand.setItemInHand(itemInHand); armorStand.setBoots(boots); armorStand.setLeggings(leggings); armorStand.setChestplate(chestplate); armorStand.setHelmet(helmet); if (bodyPose != null) armorStand.setBodyPose(bodyPose); if (leftArmPose != null) armorStand.setLeftArmPose(leftArmPose); if (rightArmPose != null) armorStand.setRightArmPose(rightArmPose); if (leftLegPose != null) armorStand.setLeftLegPose(leftLegPose); if (rightLegPose != null) armorStand.setRightLegPose(rightLegPose); if (headPose != null) armorStand.setHeadPose(headPose); armorStand.setGravity(hasGravity); armorStand.setVisible(isVisible); armorStand.setArms(hasArms); armorStand.setSmall(isSmall); armorStand.setBasePlate(hasBasePlate); armorStand.setMarker(isMarker); CompatibilityUtils.setDisabledSlots(armorStand, disabledSlots); }
public static void equipArmorStand(LivingEntity armor, Team team) { if (!(armor instanceof ArmorStand)) { return; } ArmorStand stand = (ArmorStand) armor; // helmet ItemStack helmet = new ItemStack(Material.LEATHER_HELMET, 1); LeatherArmorMeta meta = (LeatherArmorMeta) helmet.getItemMeta(); meta.setColor(team.getColor().getColor()); helmet.setItemMeta(meta); // chestplate ItemStack chestplate = new ItemStack(Material.LEATHER_CHESTPLATE, 1); meta = (LeatherArmorMeta) chestplate.getItemMeta(); meta.setColor(team.getColor().getColor()); chestplate.setItemMeta(meta); // leggings ItemStack leggings = new ItemStack(Material.LEATHER_LEGGINGS, 1); meta = (LeatherArmorMeta) leggings.getItemMeta(); meta.setColor(team.getColor().getColor()); leggings.setItemMeta(meta); // boots ItemStack boots = new ItemStack(Material.LEATHER_BOOTS, 1); meta = (LeatherArmorMeta) boots.getItemMeta(); meta.setColor(team.getColor().getColor()); boots.setItemMeta(meta); stand.setHelmet(helmet); stand.setChestplate(chestplate); stand.setLeggings(leggings); stand.setBoots(boots); }
public static void equipArmorStand(LivingEntity armor, Team team) { if (!(armor instanceof ArmorStand)) { return; } ArmorStand stand = (ArmorStand) armor; // helmet ItemStack helmet = new ItemStack(Material.LEATHER_HELMET, 1); LeatherArmorMeta meta = (LeatherArmorMeta) helmet.getItemMeta(); meta.setColor(team.getColor().getColor()); helmet.setItemMeta(meta); // chestplate ItemStack chestplate = new ItemStack(Material.LEATHER_CHESTPLATE, 1); meta = (LeatherArmorMeta) chestplate.getItemMeta(); meta.setColor(team.getColor().getColor()); chestplate.setItemMeta(meta); // leggings ItemStack leggings = new ItemStack(Material.LEATHER_LEGGINGS, 1); meta = (LeatherArmorMeta) leggings.getItemMeta(); meta.setColor(team.getColor().getColor()); leggings.setItemMeta(meta); // boots ItemStack boots = new ItemStack(Material.LEATHER_BOOTS, 1); meta = (LeatherArmorMeta) boots.getItemMeta(); meta.setColor(team.getColor().getColor()); boots.setItemMeta(meta); stand.setHelmet(helmet); stand.setChestplate(chestplate); stand.setLeggings(leggings); stand.setBoots(boots); }