Possible fix for pet names not showing

This commit is contained in:
LCastr0 2017-03-14 09:59:38 -03:00
parent f5a85f2a54
commit df4d0b117b
1 changed files with 13 additions and 13 deletions

View File

@ -271,7 +271,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
//Named Pet
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
//pet.setCustomNameVisible(true);
pet.setCustomNameVisible(true);
pet.setCustomName(Get(player).getPets().get(petType));
}
@ -300,9 +300,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
DisguiseGuardian disguise = new DisguiseGuardian(pet);
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
disguise.setName(Get(player).getPets().get(entityType));
disguise.setName(Get(player).getPets().get(petType));
disguise.setCustomNameVisible(true);
}
@ -317,9 +317,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
Zombie zombie = pet.getWorld().spawn(pet.getLocation(), Zombie.class);
zombie.setBaby(true);
zombie.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
zombie.setCustomName(Get(player).getPets().get(entityType));
zombie.setCustomName(Get(player).getPets().get(petType));
zombie.setCustomNameVisible(true);
}
disguise.getEntity().getBukkitEntity().setPassenger(zombie);
@ -332,9 +332,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
disguiseZombie.setChestplate(new ItemStack(Material.BANNER));
disguiseZombie.setHeldItem(new ItemStack(Material.WOOD_HOE));
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
disguiseZombie.setName(Get(player).getPets().get(entityType));
disguiseZombie.setName(Get(player).getPets().get(petType));
disguiseZombie.setCustomNameVisible(true);
}
@ -354,9 +354,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
UtilEnt.silence(zombie, true);
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
zombie.setCustomName(Get(player).getPets().get(entityType));
zombie.setCustomName(Get(player).getPets().get(petType));
zombie.setCustomNameVisible(true);
}
}
@ -369,9 +369,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
disguiseVillager.setBaby();
disguiseVillager.setHeldItem(new ItemStack(Material.BOW));
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
disguiseVillager.setName(Get(player).getPets().get(entityType));
disguiseVillager.setName(Get(player).getPets().get(petType));
disguiseVillager.setCustomNameVisible(true);
}
@ -386,9 +386,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
UtilEnt.silence(zombie, true);
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
if (Get(player).getPets().get(petType) != null && Get(player).getPets().get(petType).length() > 0)
{
zombie.setCustomName(Get(player).getPets().get(entityType));
zombie.setCustomName(Get(player).getPets().get(petType));
zombie.setCustomNameVisible(true);
}