Leprechaun pet fixed
This commit is contained in:
parent
e731a91e40
commit
8088cef29f
@ -169,7 +169,8 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
|
||||
ItemStack item = pet.getDisplayItem();
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
itemMeta.setDisplayName("A");
|
||||
itemMeta.setDisplayName(C.cGreen + C.Bold + pet.getName() + C.cGreen + " (" + C.cWhite + petName + C.cGreen + ")");
|
||||
itemMeta.setLore(itemLore);
|
||||
item.setItemMeta(itemMeta);
|
||||
|
||||
addButton(slot, new ShopItem(item, false, false).hideInfo(), new DeactivatePetButton(this, getPlugin().getPetManager()));
|
||||
@ -180,29 +181,11 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
{
|
||||
itemLore.add(C.cBlack);
|
||||
itemLore.add(C.cGreen + "Click to Enable");
|
||||
/*
|
||||
ItemStack petItem = ItemStackFactory.Instance.CreateStack(pet.getMaterial(), pet.getData(), 1,
|
||||
pet.getName() + " (" + C.cWhite + petName + C.cGreen + ")", itemLore);
|
||||
|
||||
IButton iButton = new ActivatePetButton(pet, this);
|
||||
|
||||
if (pet.equals(PetType.SHULKER))
|
||||
{
|
||||
petItem = UtilItem.getVersionSpecificItem(_player, UtilPlayer.PlayerVersion._1_9, petItem);
|
||||
if (petItem.getType().equals(Material.BARRIER))
|
||||
{
|
||||
iButton = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Does not set the item stack yet
|
||||
//petItem.setType(Material.getMaterial(201));
|
||||
}
|
||||
}*/
|
||||
|
||||
ItemStack item = pet.getDisplayItem();
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
itemMeta.setDisplayName("A");
|
||||
itemMeta.setDisplayName(C.cGreen + C.Bold + pet.getName() + C.cGreen + " (" + C.cWhite + petName + C.cGreen + ")");
|
||||
itemMeta.setLore(itemLore);
|
||||
item.setItemMeta(itemMeta);
|
||||
|
||||
addButton(slot, new ShopItem(item, false, false).hideInfo(), new ActivatePetButton(pet, this));
|
||||
|
@ -398,17 +398,13 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
zombie.setBaby(true);
|
||||
|
||||
UtilEnt.silence(zombie, true);
|
||||
UtilEnt.ghost(zombie, true, true);
|
||||
|
||||
ItemStack[] armors = new ItemStack[]
|
||||
{
|
||||
SkinData.LEPRECHAUN.getSkull(),
|
||||
ItemStackFactory.Instance.createColoredLeatherArmor(0, org.bukkit.Color.fromRGB(1, 153, 0)),
|
||||
ItemStackFactory.Instance.createColoredLeatherArmor(0, org.bukkit.Color.fromRGB(2, 153, 0)),
|
||||
ItemStackFactory.Instance.createColoredLeatherArmor(0, org.bukkit.Color.fromRGB(3, 153, 0))
|
||||
};
|
||||
zombie.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
|
||||
|
||||
zombie.getEquipment().setArmorContents(armors);
|
||||
zombie.getEquipment().setHelmet(SkinData.LEPRECHAUN.getSkull());
|
||||
zombie.getEquipment().setChestplate(ItemStackFactory.Instance.createColoredLeatherArmor(1, org.bukkit.Color.fromRGB(0, 153, 0)));
|
||||
zombie.getEquipment().setLeggings(ItemStackFactory.Instance.createColoredLeatherArmor(2, org.bukkit.Color.fromRGB(0, 153, 0)));
|
||||
zombie.getEquipment().setBoots(ItemStackFactory.Instance.createColoredLeatherArmor(3, org.bukkit.Color.fromRGB(0, 153, 0)));
|
||||
}
|
||||
|
||||
_activePetOwnerTypes.put(player.getName(), petType);
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.pet.sales.PetSalesPackage;
|
||||
|
||||
public enum PetType
|
||||
@ -32,7 +33,7 @@ public enum PetType
|
||||
GINGERBREAD_MAN("Gingerbread Man", EntityType.ZOMBIE, -16, "Looks like you can catch him after all."),
|
||||
CUPID_PET("Cupid", EntityType.ZOMBIE, -17, "Sometimes you need a little extra help finding true Love. Why not have Cupid help you out?", Material.BOW, (byte) 0),
|
||||
TRUE_LOVE_PET("True Love", EntityType.ZOMBIE, -14, "Sometimes love means chasing the person of your dreams until you catch them.", Material.APPLE, YearMonth.of(2017, Month.FEBRUARY)),
|
||||
LEPRECHAUN("Leprechaun", EntityType.ZOMBIE, -18, "Placeholder")
|
||||
LEPRECHAUN("Leprechaun", EntityType.ZOMBIE, -18, "Placeholder", SkinData.LEPRECHAUN.getSkull())
|
||||
// TODO CHECK IF LOBBY IS 1.9+
|
||||
// Not in this update
|
||||
//SHULKER("Shulker Pet", EntityType.BAT, 0, "Is it a turtle or an alien? Either way its shot can be really UPLIFTING.")
|
||||
@ -127,7 +128,7 @@ public enum PetType
|
||||
{
|
||||
if (_displayItem == null)
|
||||
{
|
||||
return new ItemStack(_material, _data);
|
||||
return new ItemStack(_material, 1, _data);
|
||||
}
|
||||
return _displayItem;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user