diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/BaconBrawl.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/BaconBrawl.java index 475b6452e..e66165d86 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/BaconBrawl.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/BaconBrawl.java @@ -24,7 +24,7 @@ public class BaconBrawl extends SoloGame new Kit[] { new KitPig(manager), - new KitBabyPig(manager), + new KitMamaPig(manager), new KitSheepPig(manager) }, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitBabyPig.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitMamaPig.java similarity index 52% rename from Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitBabyPig.java rename to Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitMamaPig.java index 82c09b245..42cf880f7 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitBabyPig.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/baconbrawl/kits/KitMamaPig.java @@ -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); } }