Replaced bebe piggles kit with a new kit

This commit is contained in:
Cheese 2015-03-26 17:43:22 +11:00
parent e3eda38c2c
commit 821c7f0cb6
2 changed files with 15 additions and 40 deletions

View File

@ -24,7 +24,7 @@ public class BaconBrawl extends SoloGame
new Kit[]
{
new KitPig(manager),
new KitBabyPig(manager),
new KitMamaPig(manager),
new KitSheepPig(manager)
},

View File

@ -1,18 +1,12 @@
package nautilus.game.arcade.game.games.baconbrawl.kits;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.disguise.disguises.DisguiseChicken;
import mineplex.core.disguise.disguises.DisguisePig;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
@ -22,15 +16,15 @@ import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkBaconBlast;
import nautilus.game.arcade.kit.perks.PerkSpeed;
public class KitBabyPig extends Kit
public class KitMamaPig extends Kit
{
public KitBabyPig(ArcadeManager manager)
public KitMamaPig(ArcadeManager manager)
{
super(manager, "Bebe Piggles", KitAvailability.Gem,
super(manager, "Mama Piggles", KitAvailability.Gem,
new String[]
{
"Tiny pig runs so fast!"
"Maba & Baby Piggles fight together!"
},
new Perk[]
@ -50,35 +44,16 @@ public class KitBabyPig extends Kit
//Disguise
DisguisePig disguise = new DisguisePig(player);
disguise.setName(C.cYellow + player.getName());
disguise.setCustomNameVisible(true);
disguise.setBaby();
disguise.setCustomNameVisible(false);
Manager.GetDisguise().disguise(disguise);
}
@Override
public Entity SpawnEntity(Location loc)
{
EntityType type = _entityType;
if (type == EntityType.PLAYER)
type = EntityType.ZOMBIE;
LivingEntity entity = (LivingEntity) Manager.GetCreature().SpawnEntity(loc, type);
entity.setRemoveWhenFarAway(false);
entity.setCustomName(GetAvailability().GetColor() + GetName() + " Kit");
entity.setCustomNameVisible(true);
entity.getEquipment().setItemInHand(_itemInHand);
if (type == EntityType.PIG)
{
Pig sheep = (Pig)entity;
sheep.setBaby();
}
UtilEnt.Vegetate(entity);
SpawnCustom(entity);
return entity;
Manager.GetGame().CreatureAllowOverride = true;
Pig pig = player.getWorld().spawn(player.getEyeLocation(), Pig.class);
pig.setBaby();
pig.setAgeLock(true);
pig.setCustomName(C.cYellow + player.getName());
pig.setCustomNameVisible(true);
player.setPassenger(pig);
}
}