Replaced several instances of the now deprecated "setItemInHand" with "setItemInMainHand"

This commit is contained in:
David Berdik 2016-03-03 20:57:09 -05:00
parent b8cc5a19fc
commit 792643633d
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ public class CustomSkeleton extends EntitySkeleton implements CustomEntity {
getAttributeInstance(GenericAttributes.maxHealth).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
setCustomName("Demon");
((Skeleton) getBukkitEntity()).getEquipment().setItemInHand(new ItemStack(Material.GOLDEN_APPLE, 1));
((Skeleton) getBukkitEntity()).getEquipment().setItemInMainHand(new ItemStack(Material.GOLDEN_APPLE, 1));
((Skeleton) getBukkitEntity()).getEquipment().setHelmet(ItemName.colorLeatherArmor(new ItemStack(Material.LEATHER_HELMET, 1), Color.RED));
((Skeleton) getBukkitEntity()).getEquipment().setChestplate(ItemName.colorLeatherArmor(new ItemStack(Material.LEATHER_CHESTPLATE, 1), Color.RED));
((Skeleton) getBukkitEntity()).getEquipment().setLeggings(ItemName.colorLeatherArmor(new ItemStack(Material.LEATHER_LEGGINGS, 1), Color.RED));

View File

@ -32,7 +32,7 @@ public class CustomZombie extends EntityZombie implements CustomEntity {
getAttributeInstance(GenericAttributes.maxHealth).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
setCustomName("Artifact Guardian");
((Zombie) getBukkitEntity()).getEquipment().setItemInHand(new ItemStack(Material.GOLD_SWORD, 1));
((Zombie) getBukkitEntity()).getEquipment().setItemInMainHand(new ItemStack(Material.GOLD_SWORD, 1));
((Zombie) getBukkitEntity()).getEquipment().setHelmet(new ItemStack(Material.GOLD_HELMET, 1));
((Zombie) getBukkitEntity()).getEquipment().setChestplate(new ItemStack(Material.GOLD_CHESTPLATE, 1));
((Zombie) getBukkitEntity()).getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS, 1));
@ -45,7 +45,7 @@ public class CustomZombie extends EntityZombie implements CustomEntity {
getAttributeInstance(GenericAttributes.maxHealth).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
setCustomName("Herobrine's Warrior");
((Zombie) getBukkitEntity()).getEquipment().setItemInHand(new ItemStack(Material.IRON_SWORD, 1));
((Zombie) getBukkitEntity()).getEquipment().setItemInMainHand(new ItemStack(Material.IRON_SWORD, 1));
((Zombie) getBukkitEntity()).getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET, 1));
((Zombie) getBukkitEntity()).getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE, 1));
((Zombie) getBukkitEntity()).getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS, 1));