@Override public ItemStack getHelmet() { return entity.getHelmet(); }
@Override public ItemStack getHelmet() { return holder.getHelmet(); }
@Override public MCItemStack getHelmet() { return new BukkitMCItemStack(as.getHelmet()); }
@Override public ItemStack[] getArmorContents() { return new ItemStack[] { entity.getHelmet(), entity.getChestplate(), entity.getLeggings(), entity.getBoots() }; }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if (livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if (livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
/** * Sets the ball in the hands of the entity. * * @param livingEntity entity */ @Override public void grab(LivingEntity livingEntity) { if(livingEntity == null) throw new IllegalArgumentException("Living entity cannot be null!"); if (this.isGrabbed()) return; this.interactionEntity = livingEntity; if (livingEntity.getEquipment().getItemInHand() == null || livingEntity.getEquipment().getItemInHand().getType() == Material.AIR) { final BallGrabEvent event = new BallGrabEvent(this, livingEntity); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { livingEntity.getEquipment().setItemInHand(this.getSpigotEntity().getHelmet().clone()); this.setHelmet(null); this.grabbed = true; } } }
public EntityArmorStandData(ArmorStand armorStand) { itemInHand = armorStand.getItemInHand(); if (itemInHand != null) itemInHand = itemInHand.clone(); boots = armorStand.getBoots(); if (boots != null) boots = boots.clone(); leggings = armorStand.getLeggings(); if (leggings != null) leggings = leggings.clone(); chestplate = armorStand.getChestplate(); if (chestplate != null) chestplate = chestplate.clone(); helmet = armorStand.getHelmet(); if (helmet != null) helmet = helmet.clone(); bodyPose = armorStand.getBodyPose(); leftArmPose = armorStand.getLeftArmPose(); rightArmPose = armorStand.getRightArmPose(); leftLegPose = armorStand.getLeftLegPose(); rightLegPose = armorStand.getRightLegPose(); headPose = armorStand.getHeadPose(); hasGravity = armorStand.hasGravity(); isVisible = armorStand.isVisible(); hasArms = armorStand.hasArms(); isSmall = armorStand.isSmall(); hasBasePlate = armorStand.hasBasePlate(); isMarker = armorStand.isMarker(); disabledSlots = CompatibilityUtils.getDisabledSlots(armorStand); }