Fixed block balloons!

This commit is contained in:
LCastr0 2016-12-29 21:40:02 -02:00
parent 16e40c2896
commit 9ec8835374
2 changed files with 14 additions and 22 deletions

View File

@ -504,7 +504,7 @@ public class GadgetManager extends MiniPlugin
// Game Modifiers
// MineStrike
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P250_Muertos, -2));
/*addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P250_Muertos, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.CZ75_Auto_Tigris, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Desert_Eagle_Blaze, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Nova_Koi, -2));
@ -515,6 +515,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AWP_Asiimov, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Knife_M9_Bayonette_Fade, -2));
addGadget(new GameModifierMineStrikeSkin(this, ));
//Blue only
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P2000_Fire_Elemental, -2));
@ -525,7 +526,11 @@ public class GadgetManager extends MiniPlugin
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Glock_18_Fade, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Galil_AR_Eco, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AK_47_Vulcan, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SG553_Pulse, -2));
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SG553_Pulse, -2));*/
for (MineStrikeSkin mineStrikeSkin : MineStrikeSkin.values())
{
addGadget(new GameModifierMineStrikeSkin(this, mineStrikeSkin, -2));
}
// Survival Games

View File

@ -7,10 +7,8 @@ import java.util.Map;
import java.util.UUID;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Zombie;
import org.bukkit.potion.PotionEffect;
@ -41,25 +39,14 @@ public class BalloonItem extends BalloonGadget
Entity[] ents = new Entity[2];
if (_balloonType.getEntityType().equals(EntityType.ARMOR_STAND))
{
ArmorStand armorStand = player.getWorld().spawn(player.getLocation(), ArmorStand.class);
armorStand.setSmall(_balloonType.isBaby());
armorStand.setGravity(false);
armorStand.setVisible(false);
armorStand.setHelmet(_balloonType.getDisplayItem());
addEntity(player, armorStand);
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
zombie.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
zombie.getEquipment().setHelmet(_balloonType.getDisplayItem());
UtilEnt.silence(zombie, true);
UtilEnt.vegetate(zombie);
addEntity(player, zombie);
ents[0] = armorStand;
Entity cow = player.getWorld().spawnEntity(player.getLocation(), EntityType.COW);
((LivingEntity) cow).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
((Ageable) cow).setBaby();
((LivingEntity) cow).addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 7, false, false));
UtilEnt.vegetate(cow);
//UtilEnt.ghost(bat, true, true);
UtilEnt.silence(cow, true);
addEntity(player, cow);
ents[1] = cow;
ents[0] = zombie;
return ents;
}