Fixed armorstand balloon types

This commit is contained in:
LCastr0 2016-12-29 16:25:20 -02:00
parent c685486086
commit 6478656501
87 changed files with 227 additions and 250 deletions

View File

@ -88,7 +88,7 @@ public class UtilEnt
((CraftEntity)entity).getHandle().setInvisible(invisible);
}
public static void Leash(LivingEntity leashed, Entity holder, boolean pull, boolean breakable)
public static void leash(LivingEntity leashed, Entity holder, boolean pull, boolean breakable)
{
leashed.setLeashHolder(holder);
@ -198,12 +198,12 @@ public class UtilEnt
return box.b(box2);
}
public static void Vegetate(Entity entity)
public static void vegetate(Entity entity)
{
Vegetate(entity, false);
vegetate(entity, false);
}
public static void Vegetate(Entity entity, boolean mute)
public static void vegetate(Entity entity, boolean mute)
{
try
{

View File

@ -1,7 +1,13 @@
package mineplex.core.gadget.gadgets.balloons;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Bat;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -11,9 +17,6 @@ import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.creature.Creature;
import mineplex.core.disguise.disguises.DisguiseArmorStand;
import mineplex.core.disguise.disguises.DisguiseWither;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.BalloonGadget;
@ -21,6 +24,7 @@ public class BalloonItem extends BalloonGadget
{
private BalloonType _balloonType;
private Map<UUID, List<Entity>> _entities = new HashMap<>();
public BalloonItem(GadgetManager manager, BalloonType balloonType)
{
@ -32,59 +36,69 @@ public class BalloonItem extends BalloonGadget
}
@Override
public Entity spawnEntity(Player player)
public Entity[] spawnEntity(Player player)
{
if (_balloonType.equals(BalloonType.BABY_WIDDER))
Entity[] ents = new Entity[2];
if (_balloonType.getEntityType().equals(EntityType.ARMOR_STAND))
{
Creature creatureModule = Manager.getPetManager().getCreatureModule();
creatureModule.SetForce(true);
Entity silverfish = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
UtilEnt.silence(silverfish, true);
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);
DisguiseWither witherDisguise = new DisguiseWither(silverfish);
ents[0] = armorStand;
witherDisguise.setInvulTime(530);
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);
org.bukkit.entity.Creature silver = (org.bukkit.entity.Creature) creatureModule.SpawnEntity(player.getLocation(), EntityType.SILVERFISH);
UtilEnt.Vegetate(silver, true);
UtilEnt.silence(silver, true);
silver.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
silverfish.setPassenger(silver);
ents[1] = cow;
Manager.getDisguiseManager().disguise(witherDisguise);
creatureModule.SetForce(false);
return silver;
}
else if (_balloonType.getEntityType().equals(EntityType.ARMOR_STAND))
{
Entity bat = player.getWorld().spawn(player.getLocation(), Bat.class);
((LivingEntity) bat).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
UtilEnt.silence(bat, true);
DisguiseArmorStand disguiseArmorStand = new DisguiseArmorStand(bat);
disguiseArmorStand.setHelmet(_balloonType.getDisplayItem());
disguiseArmorStand.setInvisible(true);
if (_balloonType.isBaby()) disguiseArmorStand.setSmall();
disguiseArmorStand.setGravityEffected();
Manager.getDisguiseManager().disguise(disguiseArmorStand);
return bat;
return ents;
}
else if (_balloonType.equals(BalloonType.BABY_ZOMBIE))
{
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
zombie.setBaby(true);
return zombie;
UtilEnt.vegetate(zombie);
addEntity(player, zombie);
ents[0] = zombie;
return ents;
}
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
if (_balloonType.isBaby() && entity instanceof Ageable)
((Ageable) entity).setBaby();
return entity;
UtilEnt.vegetate(entity);
addEntity(player, entity);
ents[0] = entity;
return ents;
}
private void addEntity(Player player, Entity entity)
{
_entities.computeIfAbsent(player.getUniqueId(), list -> new ArrayList<>());
List<Entity> entities = _entities.get(player.getUniqueId());
entities.add(entity);
_entities.put(player.getUniqueId(), entities);
}
@Override
public void removeEntities(Player player)
{
for (Entity entity : _entities.get(player.getUniqueId()))
{
entity.remove();
}
_entities.remove(player.getUniqueId());
}
}

View File

@ -10,25 +10,28 @@ import mineplex.core.common.util.UtilText;
public enum BalloonType
{
// BABY
BABY_COW (EntityType.COW, true, "Baby Cow Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_PIG (EntityType.PIG, true, "Baby Pig Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_ZOMBIE (EntityType.ZOMBIE, true, "Baby Zombie Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_MUSHROOM(EntityType.MUSHROOM_COW, true, "Baby Mushroom Cow Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
// TODO BABY WIDDER SPAWN
BABY_WIDDER(EntityType.SILVERFISH, "Baby Widder Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_OCELOT(EntityType.OCELOT, true, "Baby Ocelot Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_WOLF(EntityType.WOLF, true, "Baby Wolf Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_SHEEP(EntityType.SHEEP, true, "Baby Sheep Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_VILLAGER(EntityType.VILLAGER, true, "Baby Villager Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
SQUID(EntityType.SQUID, "Squid Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BAT(EntityType.BAT, "Bat Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_OCELOT (EntityType.OCELOT, true, "Baby Ocelot Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_WOLF (EntityType.WOLF, true, "Baby Wolf Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_SHEEP (EntityType.SHEEP, true, "Baby Sheep Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_VILLAGER(EntityType.VILLAGER, true, "Baby Villager Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_SLIME (EntityType.SLIME, true, "Baby Slime Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
// NOT BABY
SQUID (EntityType.SQUID, "Squid Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BAT (EntityType.BAT, "Bat Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
SILVERFISH(EntityType.SILVERFISH, "Silverfish Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
GUARDIAN(EntityType.GUARDIAN, "Guardian Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
BABY_SLIME(EntityType.SLIME, true, "Baby Slime Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
DRAGON_EGG(new ItemStack(Material.DRAGON_EGG), false, "Dragon Egg Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
GUARDIAN (EntityType.GUARDIAN, "Guardian Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
// BLOCK
DRAGON_EGG (new ItemStack(Material.DRAGON_EGG), false, "Dragon Egg Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
DIAMOND_BLOCK(new ItemStack(Material.DIAMOND_BLOCK), false, "Diamond Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
IRON_BLOCK(new ItemStack(Material.IRON_BLOCK), false, "Iron Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
GOLD_BLOCK(new ItemStack(Material.GOLD_BLOCK), false, "Gold Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
IRON_BLOCK (new ItemStack(Material.IRON_BLOCK), false, "Iron Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
GOLD_BLOCK (new ItemStack(Material.GOLD_BLOCK), false, "Gold Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
EMERALD_BLOCK(new ItemStack(Material.EMERALD_BLOCK), false, "Emerald Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0);
private EntityType _entityType;

View File

@ -51,7 +51,7 @@ public class ItemFootball extends ItemGadget
FallingBlock ball = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1, 0), Material.SKULL, (byte) 3);
Bat bat = player.getWorld().spawn(player.getLocation(), Bat.class);
UtilEnt.Vegetate(bat);
UtilEnt.vegetate(bat);
UtilEnt.ghost(bat, true, true);
UtilEnt.silence(bat, true);

View File

@ -134,7 +134,7 @@ public class WinEffectHalloween extends WinEffectGadget
skeleton.setCustomNameVisible(true);
skeleton.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
UtilEnt.ghost(skeleton, true, false);
UtilEnt.Vegetate(skeleton);
UtilEnt.vegetate(skeleton);
for (int i = 0; i < 15; i++)
{
playFirework(skeleton.getLocation().clone().add(0, 2, 0), i, true);

View File

@ -1,18 +1,14 @@
package mineplex.core.gadget.types;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Material;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
@ -24,11 +20,8 @@ import mineplex.core.updater.event.UpdateEvent;
public abstract class BalloonGadget extends Gadget
{
private static final List<Entity> ENTITY_LIST = new ArrayList<>();
private static final Map<UUID, Map<EntityType, BalloonData>> PLAYER_BALLOONS = new HashMap<>();
private Map<UUID, BalloonData> _playerBalloons = new HashMap<>();
private List<Entity> _entities = new ArrayList<>();
private EntityType _balloon;
public BalloonGadget(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data, EntityType balloon, String... altNames)
@ -73,7 +66,18 @@ public abstract class BalloonGadget extends Gadget
return false;
PLAYER_BALLOONS.computeIfAbsent(player.getUniqueId(), map -> new HashMap<>());
PLAYER_BALLOONS.get(player.getUniqueId()).put(_balloon, new BalloonData(player, spawnEntity(player)));
BalloonData balloonData;
Entity[] ents = spawnEntity(player);
if (ents[1] == null)
balloonData = new BalloonData(player, ents[0]);
else if (!_balloon.equals(EntityType.ARMOR_STAND))
balloonData = new BalloonData(player, ents[0], ents[1]);
else
{
balloonData = new BalloonData(player, ents[0]);
balloonData.setLeash(ents[1]);
}
PLAYER_BALLOONS.get(player.getUniqueId()).put(_balloon, balloonData);
return true;
}
@ -84,17 +88,15 @@ public abstract class BalloonGadget extends Gadget
{
if (PLAYER_BALLOONS.get(player.getUniqueId()).containsKey(_balloon))
{
BalloonData balloonData = PLAYER_BALLOONS.get(player.getUniqueId()).get(_balloon);
Entity entity = balloonData.getBalloon();
entity.remove();
Bat bat = balloonData.getBat();
bat.remove();
removeEntities(player);
PLAYER_BALLOONS.get(player.getUniqueId()).remove(_balloon);
}
}
}
protected abstract Entity spawnEntity(Player player);
protected abstract Entity[] spawnEntity(Player player);
protected abstract void removeEntities(Player player);
@EventHandler
public void onUpdate(UpdateEvent event)
@ -116,17 +118,9 @@ public abstract class BalloonGadget extends Gadget
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
{
Map<EntityType, BalloonData> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
if (balloonGadgets.containsKey(_balloon))
return false;
return balloonGadgets.size() < 10;
}
return true;
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event)
{
}
}

View File

@ -1,16 +1,12 @@
package mineplex.core.gadget.util;
import org.bukkit.Location;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
public class BalloonData
@ -22,12 +18,11 @@ public class BalloonData
*/
private Player _player;
private Entity _balloon;
private Entity _balloon, _passenger, _leash;
private Location _balloonLoc, _target;
private Vector _direction;
private double _speed;
private long _idleTime;
private Bat _bat;
public BalloonData(Player player, Entity balloon)
{
@ -38,16 +33,35 @@ public class BalloonData
_speed = 0.2;
_idleTime = 0;
_direction = new Vector(1, 0, 0);
spawnBat();
((LivingEntity) _balloon).setLeashHolder(_player);
}
// This exists for a possible widder balloon that could be added later
public BalloonData(Player player, Entity balloon, Entity passenger)
{
_player = player;
_balloon = balloon;
_passenger = passenger;
_balloonLoc = player.getEyeLocation();
_target = getNewTarget();
_speed = 0.2;
_idleTime = 0;
_direction = new Vector(1, 0, 0);
((LivingEntity) _balloon).setLeashHolder(_player);
}
public void update()
{
// Update bat
_bat.teleport(_player.getLocation());
if (((LivingEntity) _balloon).getLeashHolder() == null)
((LivingEntity) _balloon).setLeashHolder(_bat);
if (_leash == null)
{
if (!((LivingEntity) _balloon).isLeashed())
((LivingEntity) _balloon).setLeashHolder(_player);
}
else
{
if (!((LivingEntity) _leash).isLeashed())
((LivingEntity) _leash).setLeashHolder(_player);
}
//Update Target
if (UtilMath.offset(_player.getEyeLocation(), _target) > 3 || UtilMath.offset(_balloonLoc, _target) < 1)
@ -89,6 +103,15 @@ public class BalloonData
_balloon.teleport(_balloonLoc);
_balloon.setVelocity(new Vector(0, .25, 0));
if (_passenger != null)
{
_passenger.teleport(_balloonLoc);
_balloon.setPassenger(_passenger);
}
if (_leash != null)
{
_leash.teleport(_balloon.getLocation().add(0, 1.5, 0));
}
}
private Location getNewTarget()
@ -101,18 +124,10 @@ public class BalloonData
return _balloon;
}
public Bat getBat()
public void setLeash(Entity leashedEntity)
{
return _bat;
}
private void spawnBat()
{
_bat = _player.getWorld().spawn(_player.getLocation(), Bat.class);
((LivingEntity) _balloon).setLeashHolder(_bat);
_bat.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
UtilEnt.silence(_bat, true);
((LivingEntity) _balloon).setShouldBreakLeash(false);
_leash = leashedEntity;
((LivingEntity) _leash).setLeashHolder(_player);
}
}

View File

@ -86,7 +86,7 @@ public class DisplaySlot
}
else
{
UtilEnt.Vegetate(e, true);
UtilEnt.vegetate(e, true);
UtilEnt.ghost(e, true, false);
}
_pastedEntities.add(e);

View File

@ -44,7 +44,7 @@ public class DragonData extends MountData
//Spawn Dragon
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
UtilEnt.Vegetate(Dragon);
UtilEnt.vegetate(Dragon);
UtilEnt.ghost(Dragon, true, false);
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);

View File

@ -341,7 +341,7 @@ public class NpcManager extends MiniPlugin
if (npc.getDatabaseRecord().getRadius() == 0)
{
UtilEnt.Vegetate(entity);
UtilEnt.vegetate(entity);
UtilEnt.silence(entity, true);
UtilEnt.ghost(entity, true, false);
@ -604,7 +604,7 @@ public class NpcManager extends MiniPlugin
if (npc.getDatabaseRecord().getRadius() == 0)
{
UtilEnt.Vegetate(entity);
UtilEnt.vegetate(entity);
UtilEnt.ghost(entity, true, false);
}
}

View File

@ -218,7 +218,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
witherDisguise.setInvulTime(530);
Creature silverfish = (Creature) _creatureModule.SpawnEntity(location, EntityType.SILVERFISH);
UtilEnt.Vegetate(silverfish, true);
UtilEnt.vegetate(silverfish, true);
UtilEnt.silence(silverfish, true);
silverfish.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
pet.setPassenger(silverfish);
@ -358,7 +358,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
((Ageable)pet).setAgeLock(true);
}
UtilEnt.Vegetate(pet);
UtilEnt.vegetate(pet);
}
public Creature getPet(Player player)

View File

@ -1,14 +1,9 @@
package mineplex.game.clans.clans.siege.weapon;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Player;
import org.bukkit.entity.Slime;
@ -41,13 +36,11 @@ import mineplex.game.clans.clans.ClanInfo;
import mineplex.game.clans.clans.ClansGame;
import mineplex.game.clans.clans.ClansManager;
import mineplex.game.clans.clans.siege.SiegeManager;
import mineplex.game.clans.clans.siege.events.SiegeWeaponExplodeEvent;
import mineplex.game.clans.clans.siege.repository.tokens.SiegeWeaponToken;
import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile;
import mineplex.game.clans.clans.siege.weapon.util.AccessRule;
import mineplex.game.clans.clans.siege.weapon.util.AccessType;
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
import mineplex.game.clans.core.repository.ClanTerritory;
public class Cannon extends SiegeWeapon
{
@ -324,7 +317,7 @@ public class Cannon extends SiegeWeapon
Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class);
UtilEnt.silence(filler, true);
UtilEnt.Vegetate(filler);
UtilEnt.vegetate(filler);
filler.setSize(-1);
filler.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
@ -334,7 +327,7 @@ public class Cannon extends SiegeWeapon
Slime playerMount = _location.getWorld().spawn(_location.clone(), Slime.class);
UtilEnt.silence(playerMount, true);
UtilEnt.Vegetate(playerMount);
UtilEnt.vegetate(playerMount);
playerMount.setSize(-1);
playerMount.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));

View File

@ -195,7 +195,7 @@ public class CombatLogNPC
skel.setMetadata("CombatLogNPC", new FixedMetadataValue(ClansManager.getInstance().getPlugin(), player.getUniqueId().toString()));
skel.teleport(spawnLoc);
skel.setHealth(_spawnHealth);
UtilEnt.Vegetate(skel);
UtilEnt.vegetate(skel);
UtilEnt.silence(skel, true);
skel.getEquipment().setHelmet(player.getInventory().getHelmet());

View File

@ -94,7 +94,7 @@ public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
shooter.setCustomName(name);
shooter.setCustomNameVisible(true);
UtilEnt.Vegetate(shooter);
UtilEnt.vegetate(shooter);
shooter.teleport(location);
shooter.setHealth(shooter.getMaxHealth());

View File

@ -113,7 +113,7 @@ public class HalloweenSpookinessManager extends MiniPlugin
Skeleton skeleton = loc.getWorld().spawn(loc, Skeleton.class);
UtilEnt.silence(skeleton, true);
UtilEnt.Vegetate(skeleton);
UtilEnt.vegetate(skeleton);
UtilEnt.ghost(skeleton, true, false);
skeleton.getEquipment().setItemInHand(ItemStackFactory.Instance.CreateStack(0));

View File

@ -159,7 +159,7 @@ public class SoccerManager extends MiniPlugin
_ball = mid.getWorld().spawn(mid, Slime.class);
_ball.setSize(2);
UtilEnt.Vegetate(_ball);
UtilEnt.vegetate(_ball);
UtilEnt.ghost(_ball, true, false);
_ballVel = new Vector(0,-0.1,0);

View File

@ -97,7 +97,7 @@ public class BasketballGame implements Listener
{
_velocity = -7;
Entity e = loc.getWorld().spawnEntity(loc, EntityType.SLIME);
UtilEnt.Vegetate(e, true);
UtilEnt.vegetate(e, true);
UtilEnt.ghost(e, true, false);
((Slime)e).setSize(1);

View File

@ -3,7 +3,6 @@ package mineplex.minecraft.game.classcombat.Skill.Assassin;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Material;
@ -17,7 +16,6 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.core.updater.event.UpdateEvent;
@ -95,7 +93,7 @@ public class Illusion extends SkillActive
Skeleton skel = player.getWorld().spawn(player.getLocation(), Skeleton.class);
skel.teleport(player.getLocation());
UtilEnt.Vegetate(skel);
UtilEnt.vegetate(skel);
UtilEnt.silence(skel, true);
skel.setMaxHealth(14);

View File

@ -91,7 +91,7 @@ public class RopedArrow extends SkillActive
_arrows.add(event.getProjectile());
UtilEnt.Leash(player, event.getProjectile(), false, false);
UtilEnt.leash(player, event.getProjectile(), false, false);
}
@EventHandler

View File

@ -5,7 +5,6 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import org.bukkit.Bukkit;
@ -20,8 +19,6 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.util.Vector;
import com.google.common.collect.Lists;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
@ -61,7 +58,7 @@ public class SpiderCreature extends EventCreature<Spider>
@Override
protected void spawnCustom()
{
UtilEnt.Vegetate(getEntity());
UtilEnt.vegetate(getEntity());
}
@Override

View File

@ -49,7 +49,7 @@ public class SpiderMinionCreature extends EventCreature<CaveSpider>
@Override
protected void spawnCustom()
{
UtilEnt.Vegetate(getEntity(), true);
UtilEnt.vegetate(getEntity(), true);
getEntity().setVelocity(new Vector(UtilMath.rr(0.5, true), 0.4, UtilMath.rr(0.4, true)));
}

View File

@ -40,7 +40,6 @@ import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.util.Vector;
public class GolemCreature extends EventCreature<IronGolem>
@ -124,7 +123,7 @@ public class GolemCreature extends EventCreature<IronGolem>
@Override
protected void spawnCustom()
{
UtilEnt.Vegetate(getEntity());
UtilEnt.vegetate(getEntity());
// EntityInsentient creature = (EntityInsentient) ((CraftEntity) getEntity()).getHandle();
// creature.Vegetated = false;

View File

@ -79,7 +79,7 @@ public class SkeletonCreature extends EventCreature<Skeleton>
@Override
protected void spawnCustom()
{
UtilEnt.Vegetate(getEntity());
UtilEnt.vegetate(getEntity());
getEntity().setSkeletonType(SkeletonType.WITHER);
getEntity().getEquipment().setItemInHand(new ItemStack(Material.RECORD_6)); //Meridian Scepter
getEntity().getEquipment().setItemInHandDropChance(0.f);

View File

@ -82,7 +82,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
for (int i = 0; i < getBoss().Archers.size(); i++)
{
Skeleton archer = getBoss().Archers.get(i).getEntity();
UtilEnt.Vegetate(archer);
UtilEnt.vegetate(archer);
((CraftSkeleton)archer).setVegetated(false);
double lead = i * ((2d * Math.PI)/getBoss().Archers.size());
@ -98,7 +98,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
if (initial)
{
archer.teleport(getEntity().getLocation().add(oX, oY, oZ));
UtilEnt.Vegetate(archer);
UtilEnt.vegetate(archer);
}
else
{

View File

@ -2,9 +2,7 @@ package mineplex.minecraft.game.core.boss.snake;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Effect;
@ -26,7 +24,6 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.boss.EventCreature;
@ -58,7 +55,7 @@ public class SnakeCreature extends EventCreature<Silverfish>
protected void spawnCustom()
{
getEntity().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 10000, 0));
UtilEnt.Vegetate(getEntity());
UtilEnt.vegetate(getEntity());
UtilEnt.ghost(getEntity(), true, false);
Vector dir = new Vector(UtilMath.rr(1, true), 0, UtilMath.rr(1, true)).normalize().multiply(_seperator);

View File

@ -73,7 +73,7 @@ public class KitSheepPig extends ProgressingKit
sheep.setColor(DyeColor.PINK);
}
UtilEnt.Vegetate(entity);
UtilEnt.vegetate(entity);
SpawnCustom(entity);

View File

@ -137,7 +137,7 @@ public class Basketball extends TeamGame
this.CreatureAllowOverride = true;
_velocity = -7;
Entity e = Manager.GetCreature().SpawnEntity(loc, EntityType.SLIME);
UtilEnt.Vegetate(e, true);
UtilEnt.vegetate(e, true);
UtilEnt.ghost(e, true, false);
((Slime)e).setSize(1);
this.CreatureAllowOverride = false;

View File

@ -8,8 +8,6 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.IronGolem;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEntityEvent;
public class IronWizardDisplay extends BossDisplay
{
@ -27,7 +25,7 @@ public class IronWizardDisplay extends BossDisplay
_golem = (IronGolem) getLocation().getWorld().spawnEntity(getLocation(),
EntityType.IRON_GOLEM);
_golem.teleport(getLocation());
UtilEnt.Vegetate(_golem);
UtilEnt.vegetate(_golem);
addEntity(_golem);
}

View File

@ -7,10 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Slime;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEntityEvent;
public class SlimeKingDisplay extends BossDisplay
{
@ -31,7 +28,7 @@ public class SlimeKingDisplay extends BossDisplay
_slime.teleport(getLocation());
UtilEnt.Vegetate(_slime);
UtilEnt.vegetate(_slime);
addEntity(_slime);
}

View File

@ -7,11 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Slime;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEntityEvent;
public class SnakeDisplay extends BossDisplay
{
@ -30,7 +26,7 @@ public class SnakeDisplay extends BossDisplay
_sheep.teleport(getLocation());
UtilEnt.Vegetate(_sheep);
UtilEnt.vegetate(_sheep);
addEntity(_sheep);
}

View File

@ -29,7 +29,7 @@ public class SpiderDisplay extends BossDisplay
Entity entity = getLocation().getWorld().spawnEntity(getLocation(),
EntityType.SPIDER);
UtilEnt.Vegetate(entity);
UtilEnt.vegetate(entity);
this.addEntity(entity);
}

View File

@ -108,7 +108,7 @@ public class Ball
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
_ball.setSize(2);
UtilEnt.Vegetate(_ball);
UtilEnt.vegetate(_ball);
UtilEnt.ghost(_ball, false, false);
_host.CreatureAllowOverride = false;

View File

@ -197,7 +197,7 @@ public class BuildData
}
Entities.add(entity);
UtilEnt.Vegetate(entity, true);
UtilEnt.vegetate(entity, true);
UtilEnt.ghost(entity, true, false);
return true;
}

View File

@ -51,7 +51,7 @@ public class Sleigh
Target = loc.clone();
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
UtilEnt.Vegetate(CentralEntity, true);
UtilEnt.vegetate(CentralEntity, true);
UtilEnt.ghost(CentralEntity, true, false);
Host.Manager.GetCondition().Factory().Invisible("Sleigh", (LivingEntity) CentralEntity, null, Double.MAX_VALUE, 3, false, false, true);

View File

@ -187,7 +187,7 @@ public class SleighHorse
horseId = UtilEnt.getNewEntityId(false);
_previousDir = getAngles(_lastFacing.getYaw());
Ent = _lastFacing.getWorld().spawn(_lastFacing.subtract(0, 0.5, 0), Horse.class);
UtilEnt.Vegetate(Ent);
UtilEnt.vegetate(Ent);
UtilEnt.ghost(Ent, true, false);
Ent.setRemoveWhenFarAway(false);

View File

@ -36,7 +36,7 @@ public class SleighPart
Ent.setAgeLock(true);
Ent.setRemoveWhenFarAway(false);
UtilEnt.Vegetate(Ent, true);
UtilEnt.vegetate(Ent, true);
UtilEnt.ghost(Ent, true, false);
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", Ent, null, Double.MAX_VALUE, 3, false, false, true);
@ -87,7 +87,7 @@ public class SleighPart
return null;
Skeleton skel = Ent.getWorld().spawn(Ent.getLocation().add(0, 1, 0), Skeleton.class);
UtilEnt.Vegetate(skel);
UtilEnt.vegetate(skel);
UtilEnt.ghost(skel, true, false);
ItemStack head = new ItemStack(Material.LEATHER_HELMET);
@ -169,7 +169,7 @@ public class SleighPart
newTop.setAgeLock(true);
newTop.setRemoveWhenFarAway(false);
UtilEnt.Vegetate(newTop, true);
UtilEnt.vegetate(newTop, true);
UtilEnt.ghost(newTop, true, false);
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", newTop, null, Double.MAX_VALUE, 3, false, false, true);

View File

@ -1,7 +1,6 @@
package nautilus.game.arcade.game.games.christmas.content;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import mineplex.core.common.util.UtilAction;
@ -9,11 +8,10 @@ import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.game.games.christmas.Christmas;
import nautilus.game.arcade.game.games.christmas.parts.Part5;
import net.minecraft.server.v1_8_R3.EntityCreature;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.entity.Player;
@ -116,7 +114,7 @@ public class BossSnowmanPattern
Location loc = _spawnA.get(i);
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
_ents.add(new BossSnowman(ent, loc, _aDir));
}
@ -129,7 +127,7 @@ public class BossSnowmanPattern
Location loc = _spawnB.get(i);
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
_ents.add(new BossSnowman(ent, loc, _bDir));
}

View File

@ -10,7 +10,6 @@ import nautilus.game.arcade.game.games.christmas.parts.Part4;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Giant;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
@ -30,7 +29,7 @@ public class CaveGiant
Host.Host.CreatureAllowOverride = true;
_ent = loc.getWorld().spawn(loc, Giant.class);
Host.Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(_ent);
UtilEnt.vegetate(_ent);
_ent.setMaxHealth(300);
_ent.setHealth(300);

View File

@ -47,7 +47,7 @@ public class PumpkinKing
Host.Host.CreatureAllowOverride = true;
_ent = UtilVariant.spawnWitherSkeleton(loc);
Host.Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(_ent);
UtilEnt.vegetate(_ent);
UtilEnt.ghost(_ent, true, false);
_ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));

View File

@ -51,7 +51,7 @@ public class SnowmanBoss
_heart = _spawn.getWorld().spawn(_spawn, IronGolem.class);
_heart.setMaxHealth(1400);
_heart.setHealth(1400);
UtilEnt.Vegetate(_heart);
UtilEnt.vegetate(_heart);
Host.CreatureAllowOverride = false;

View File

@ -262,7 +262,7 @@ public class SnowmanMaze
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
_ents.put(ent, new SnowmanWaypoint(ent.getLocation()));
}

View File

@ -20,7 +20,7 @@ public class SnowmanMinion
public SnowmanMinion(Snowman ent)
{
Ent = ent;
UtilEnt.Vegetate(Ent);
UtilEnt.vegetate(Ent);
Ent.setMaxHealth(100);
Ent.setHealth(Ent.getMaxHealth());

View File

@ -96,7 +96,7 @@ public class SnowmanWaveA
Host.CreatureAllowOverride = true;
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
_ents.add(ent);
}

View File

@ -6,7 +6,6 @@ import java.util.Iterator;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.game.games.christmas.Christmas;
import net.minecraft.server.v1_8_R3.EntityCreature;
@ -93,7 +92,7 @@ public class SnowmanWaveB
Host.CreatureAllowOverride = true;
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
_ents.add(ent);
}

View File

@ -41,7 +41,7 @@ public class DragonData
//Spawn Dragon
manager.GetGame().CreatureAllowOverride = true;
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
UtilEnt.Vegetate(Dragon);
UtilEnt.vegetate(Dragon);
manager.GetGame().CreatureAllowOverride = false;
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);

View File

@ -155,7 +155,7 @@ public class Dragons extends SoloGame
{
CreatureAllowOverride = true;
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
CreatureAllowOverride = false;
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);

View File

@ -156,7 +156,7 @@ public class DragonsTeams extends TeamGame
{
CreatureAllowOverride = true;
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
CreatureAllowOverride = false;
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);

View File

@ -172,7 +172,7 @@ public class Gladiators extends SoloGame
DisguisePlayer player = new DisguisePlayer(zombie, (zombie.equals(zombie1) ? tiger : random));
Manager.GetDisguise().disguise(player);
UtilEnt.Vegetate(zombie);
UtilEnt.vegetate(zombie);
zombie.getEquipment().setHelmet(ArenaType.ORANGE.getLoadout().getHelmet());
zombie.getEquipment().setChestplate(ArenaType.ORANGE.getLoadout().getChestplate());
zombie.getEquipment().setLeggings(ArenaType.ORANGE.getLoadout().getLeggings());

View File

@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
@ -44,7 +43,6 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.recharge.Recharge;
@ -333,12 +331,12 @@ public class Gravity extends SoloGame
this.CreatureAllowOverride = false;
slime.setSize(1);
UtilEnt.Vegetate(slime, true);
UtilEnt.vegetate(slime, true);
UtilEnt.ghost(slime, true, false);
GravityHook hook = new GravityHook(this, slime, 4, velocity);
UtilEnt.Leash(hook.Base, player, false, false);
UtilEnt.leash(hook.Base, player, false, false);
_hooks.put(player, hook);

View File

@ -9,7 +9,6 @@ import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.disguise.disguises.DisguiseBat;
import nautilus.game.arcade.game.games.gravity.objects.*;
import org.bukkit.Effect;
import org.bukkit.Sound;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@ -58,7 +57,7 @@ public abstract class GravityObject
Bat.setSitting(true);
Host.Manager.GetDisguise().disguise(Bat);
UtilEnt.Vegetate(Base, true);
UtilEnt.vegetate(Base, true);
//UtilEnt.ghost(Base, true, true);
Host.Manager.GetCondition().Factory().Invisible(null, Base, null, 9999, 1, false, false, false);
}

View File

@ -27,7 +27,6 @@ import nautilus.game.arcade.game.games.halloween.Halloween;
import nautilus.game.arcade.game.games.halloween.HalloweenAudio;
import net.minecraft.server.v1_8_R3.EntityArrow;
import net.minecraft.server.v1_8_R3.EntityCreature;
import net.minecraft.server.v1_8_R3.Navigation;
import net.minecraft.server.v1_8_R3.NavigationAbstract;
import org.bukkit.Effect;
@ -391,7 +390,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
_minions.add(skel);
UtilEnt.Vegetate(skel);
UtilEnt.vegetate(skel);
}
_minionSpawn = false;
@ -646,7 +645,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
Blaze ent = GetEntity().getWorld().spawn(GetEntity().getLocation().add(0, 6, 0), Blaze.class);
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
_shields.add(ent);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
//ent.setSize(1);
Host.CreatureAllowOverride = false;

View File

@ -245,7 +245,7 @@ public class Halloween2016 extends Halloween
CreatureAllowOverride = true;
ArmorStand bat = doorSchematicLocation.getWorld().spawn(doorSchematicLocation, ArmorStand.class);
CreatureAllowOverride = false;
UtilEnt.Vegetate(bat, true);
UtilEnt.vegetate(bat, true);
UtilEnt.setAI(bat, false);
UtilEnt.setTickWhenFarAway(bat, true);
bat.setRemoveWhenFarAway(false);

View File

@ -57,7 +57,7 @@ public class MobGiant extends CryptBreaker<Giant>
ent.setHealth(ent.getMaxHealth());
UtilEnt.setBoundingBox(_pathDummy, 0, 0);
UtilEnt.Vegetate(_pathDummy, true);
UtilEnt.vegetate(_pathDummy, true);
UtilEnt.setStepHeight(_pathDummy, 1);
//Prevent other mobs from pushing the giant

View File

@ -110,7 +110,7 @@ public class MobPumpkinPrince extends CreatureBase<Skeleton> implements Listener
((CraftZombie)_horse).getHandle().b(true);
_horse.setPassenger(ent);
UtilEnt.Vegetate(_horse);
UtilEnt.vegetate(_horse);
UtilServer.RegisterEvents(this);

View File

@ -132,7 +132,7 @@ public class MobWitch extends CreatureBase<Zombie>
for(int i = 0; i < BATS_BURST; i++)
{
Bat bat = GetEntity().getWorld().spawn(GetEntity().getEyeLocation(), Bat.class);
UtilEnt.Vegetate(bat);
UtilEnt.vegetate(bat);
_bats.add(bat);
addEntityPart(bat);
}

View File

@ -228,7 +228,7 @@ public class WaveBoss extends WaveBase implements Listener
_pumpkinKing.setCustomName(C.cYellow + C.Bold + "Pumpking King");
_pumpkinKing.setCustomNameVisible(true);
UtilEnt.Vegetate(_pumpkinKing);
UtilEnt.vegetate(_pumpkinKing);
_pumpkinKing.getWorld().strikeLightningEffect(_pumpkinKing.getLocation());
}

View File

@ -80,7 +80,7 @@ public class Spawner
if (canSpawnMob(l))
{
Entity e = Host.getArcadeManager().GetCreature().SpawnEntity(l, _toSpawn);
UtilEnt.Vegetate(e);
UtilEnt.vegetate(e);
spawned = true;
_lastSpawned = System.currentTimeMillis();
continue;

View File

@ -24,7 +24,7 @@ public class PathfinderData
{
Wither = wither;
UtilEnt.ghost(wither, true, false);
UtilEnt.Vegetate(wither, false);
UtilEnt.vegetate(wither, false);
Location temp = wither.getLocation();
temp.setPitch(UtilAlg.GetPitch(UtilAlg.getTrajectory(wither.getLocation(), target)));

View File

@ -125,7 +125,7 @@ public class WitherMinionManager implements Listener
Skeleton e = UtilVariant.spawnWitherSkeleton(chosen);
_entity = (Skeleton)e;
UtilEnt.ghost(e, true, false);
UtilEnt.Vegetate(e);
UtilEnt.vegetate(e);
e.setCustomName(C.cRed + "Wither Skeleton");
((Skeleton)e).setMaxHealth(/*100*/65);
((Skeleton)e).setHealth(/*100*/65);

View File

@ -35,7 +35,7 @@ public class ZombieWrapper
_wrapper = (Zombie) world.spawnEntity(center.clone().add(0.5, 1, 0.5), EntityType.ZOMBIE);
UtilEnt.Vegetate(_wrapper);
UtilEnt.vegetate(_wrapper);
UtilEnt.ghost(_wrapper, true, false);
_wrapper.setCustomName(C.cRedB + "Infected Zombie");

View File

@ -230,7 +230,7 @@ public class ChallengeRedLightGreenLight extends Challenge
Location spawn = getCenter().add(VILLAGER_X, MAP_HEIGHT, 0);
_villager = (Villager) getCenter().getWorld().spawnEntity(spawn, EntityType.VILLAGER);
UtilEnt.Vegetate(_villager);
UtilEnt.vegetate(_villager);
UtilEnt.CreatureLook(_villager, Host.GetSpectatorLocation());
UtilEnt.ghost(_villager, true, false);

View File

@ -241,7 +241,7 @@ public class ChallengeVolleyPig extends TeamChallenge
getCenter().add(PIG_CENTER_X, PIG_CENTER_Y, PIG_CENTER_Z).subtract(getArenaSize(), 0, 0),
Pig.class);
UtilEnt.Vegetate(_pig);
UtilEnt.vegetate(_pig);
Host.CreatureAllow = false;
}

View File

@ -1,7 +1,6 @@
package nautilus.game.arcade.game.games.monsterleague;
import java.util.ArrayList;
import java.util.HashMap;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
@ -17,7 +16,6 @@ import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.monsterleague.kits.LeagueKit;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.EntityEffect;
@ -159,7 +157,7 @@ public class Ball
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
_ball.setSize(2);
UtilEnt.Vegetate(_ball);
UtilEnt.vegetate(_ball);
UtilEnt.ghost(_ball, false, false);
_host.CreatureAllowOverride = false;

View File

@ -530,7 +530,7 @@ public class Maze implements Listener
_host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent, true);
UtilEnt.vegetate(ent, true);
UtilEnt.ghost(ent, true, false);
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
@ -568,7 +568,7 @@ public class Maze implements Listener
_host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent, true);
UtilEnt.vegetate(ent, true);
UtilEnt.ghost(ent, true, false);
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));

View File

@ -45,7 +45,7 @@ public class PlayerCopyPaintball
UtilEnt.ghost(_ent, true, false);
UtilEnt.Vegetate(_ent);
UtilEnt.vegetate(_ent);
_ent.setArms(true);
_ent.setBasePlate(false);

View File

@ -57,7 +57,7 @@ public class SheepData
StuckLocation = Sheep.getLocation();
StuckTime = System.currentTimeMillis();
UtilEnt.Vegetate(Sheep);
UtilEnt.vegetate(Sheep);
UtilEnt.ghost(Sheep, true, false);
}

View File

@ -105,7 +105,7 @@ public class PerkChickenRocket extends SmashPerk
ent.getLocation().setYaw(player.getLocation().getYaw());
ent.setBaby();
ent.setAgeLock(true);
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
Manager.GetGame().CreatureAllowOverride = false;
_data.add(new ChickenMissileData(player, ent));

View File

@ -54,7 +54,7 @@ public class SmashEnderman extends SmashUltimate
Manager.GetGame().CreatureAllowOverride = true;
EnderDragon dragon = player.getWorld().spawn(player.getLocation().add(0, 5, 0), EnderDragon.class);
UtilEnt.Vegetate(dragon);
UtilEnt.vegetate(dragon);
Manager.GetGame().CreatureAllowOverride = false;
dragon.setCustomName(C.cYellow + player.getName() + "'s Dragon");

View File

@ -125,7 +125,7 @@ public class PerkPigBaconBomb extends SmashPerk
Manager.GetGame().CreatureAllowOverride = false;
pig.setBaby();
UtilEnt.Vegetate(pig);
UtilEnt.vegetate(pig);
UtilEnt.ghost(pig, true, false);
UUID key = player.getUniqueId();

View File

@ -69,7 +69,7 @@ public class SmashSnowman extends SmashUltimate
Snowman ent = player.getWorld().spawn(player.getEyeLocation(), Snowman.class);
game.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.vegetate(ent);
UtilEnt.ghost(ent, true, false);
ent.setMaxHealth(TURRET_HEALTH);

View File

@ -113,7 +113,7 @@ public class PerkWolf extends SmashPerk
wolf.setAngry(true);
UtilEnt.Vegetate(wolf);
UtilEnt.vegetate(wolf);
wolf.setMaxHealth(WOLF_HEALTH);
wolf.setHealth(wolf.getMaxHealth());

View File

@ -12,7 +12,6 @@ import org.bukkit.EntityEffect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@ -23,13 +22,9 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_8_R3.EntityCreature;
import net.minecraft.server.v1_8_R3.Navigation;
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
@ -53,7 +48,6 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GamePrepareCountdownCommence;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.snake.events.SlimeUpgradeEvent;
import nautilus.game.arcade.game.games.snake.events.TailGrowEvent;
import nautilus.game.arcade.game.games.snake.kits.KitInvulnerable;
@ -137,7 +131,7 @@ public class Snake extends SoloGame
sheep.setColor(DyeColor.getByDyeData((byte) (i % 16)));
sheep.setPassenger(player);
UtilEnt.Vegetate(sheep);
UtilEnt.vegetate(sheep);
_tail.put(player, new ArrayList<Creature>());
_tail.get(player).add(sheep);
@ -384,7 +378,7 @@ public class Snake extends SoloGame
Slime pig = loc.getWorld().spawn(loc, Slime.class);
this.CreatureAllowOverride = false;
pig.setSize(2);
UtilEnt.Vegetate(pig);
UtilEnt.vegetate(pig);
_food.add(pig);
}
@ -454,7 +448,7 @@ public class Snake extends SoloGame
//Sets yaw/pitch
tail.teleport(loc);
UtilEnt.Vegetate(tail);
UtilEnt.vegetate(tail);
UtilEnt.ghost(tail, true, false);
_tail.get(player).add(tail);

View File

@ -52,7 +52,7 @@ public class NpcManager implements Listener
LivingEntity npc = (LivingEntity) spawn.getWorld().spawn(spawn, getDisguiseType().getEntityClass());
npc.setCanPickupItems(false);
npc.setRemoveWhenFarAway(false);
UtilEnt.Vegetate(npc);
UtilEnt.vegetate(npc);
getGame().CreatureAllowOverride = false;
return npc;

View File

@ -9,11 +9,9 @@ import mineplex.core.updater.event.*;
import org.bukkit.*;
import org.bukkit.block.*;
import org.bukkit.entity.*;
import org.bukkit.entity.Skeleton.SkeletonType;
import org.bukkit.inventory.*;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.*;
/**
* Created by Tim on 8/5/2014.
@ -106,7 +104,7 @@ public class PowerUpItem
_powerUpManager.getGame().CreatureAllowOverride = true;
_npc = itemLocation.getWorld().spawn(itemLocation, Skeleton.class);
_powerUpManager.getGame().CreatureAllowOverride = false;
UtilEnt.Vegetate(_npc);
UtilEnt.vegetate(_npc);
UtilEnt.ghost(_npc, true, false);
_npc.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));

View File

@ -340,7 +340,7 @@ public class SpeedBuilders extends SoloGame
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
UtilEnt.Vegetate(entity, true);
UtilEnt.vegetate(entity, true);
UtilEnt.ghost(entity, true, false);
_middleMobs.add(entity);
@ -1609,7 +1609,7 @@ public class SpeedBuilders extends SoloGame
Entity entity = block.getWorld().spawnEntity(block.getLocation().add(0.5, 0, 0.5), type);
UtilEnt.Vegetate(entity, true);
UtilEnt.vegetate(entity, true);
UtilEnt.ghost(entity, true, false);
CreatureAllowOverride = false;

View File

@ -191,7 +191,7 @@ public class RecreationData
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
UtilEnt.Vegetate(entity, true);
UtilEnt.vegetate(entity, true);
UtilEnt.ghost(entity, true, false);
Mobs.add(entity);

View File

@ -314,7 +314,7 @@ public class Minion
private void path()
{
UtilEnt.Vegetate(_entity);
UtilEnt.vegetate(_entity);
UtilEnt.silence(_entity, true);
UtilEnt.ghost(_entity, true, false);
}

View File

@ -233,7 +233,7 @@ public class TypeWars extends TeamGame
_giantLocs.put(giant, loc.clone());
this.CreatureAllowOverride = false;
giant.setRemoveWhenFarAway(false);
UtilEnt.Vegetate(giant, true);
UtilEnt.vegetate(giant, true);
UtilEnt.ghost(giant, true, false);
ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);

View File

@ -18,7 +18,6 @@ import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.noteblock.INoteVerifier;
import mineplex.core.noteblock.NBSReader;
import mineplex.core.noteblock.NotePlayer;
import mineplex.core.noteblock.NoteSong;
@ -167,7 +166,7 @@ public class Valentines extends SoloGame
_cow.setCustomName(C.cGreen + C.Bold + _cowName);
_cow.setCustomNameVisible(true);
UtilEnt.Vegetate(_cow);
UtilEnt.vegetate(_cow);
UtilEnt.ghost(_cow, true, false);
CreatureAllowOverride = false;
}
@ -410,7 +409,7 @@ public class Valentines extends SoloGame
Pig pig = loc.getWorld().spawn(loc, Pig.class);
_pigs.put(pig, pig.getLocation());
UtilEnt.Vegetate(pig);
UtilEnt.vegetate(pig);
//Give Item
if (toSpawn > 1)

View File

@ -20,7 +20,6 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.games.valentines.ValItem;
import nautilus.game.arcade.game.games.valentines.Valentines;
import nautilus.game.arcade.gametutorial.GameTutorial;
import nautilus.game.arcade.gametutorial.TutorialPhase;
@ -110,7 +109,7 @@ public class TutorialValentines extends GameTutorial
//Spawn
Pig pig = _pigSpawn.getWorld().spawn(_pigSpawn, Pig.class);
UtilEnt.Vegetate(pig);
UtilEnt.vegetate(pig);
//Item
@ -183,12 +182,12 @@ public class TutorialValentines extends GameTutorial
_cowBoy = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("BROWN").get(0), Cow.class);
_cowBoy.setCustomName(C.cGreenB + "Calvin");
_cowBoy.setCustomNameVisible(true);
UtilEnt.Vegetate(_cowBoy);
UtilEnt.vegetate(_cowBoy);
_cowGirl = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("RED").get(0), MushroomCow.class);
_cowGirl.setCustomName(C.cRedB + "Moolanie");
_cowGirl.setCustomNameVisible(true);
UtilEnt.Vegetate(_cowGirl);
UtilEnt.vegetate(_cowGirl);
Host.CreatureAllowOverride = false;

View File

@ -28,7 +28,7 @@ public class PlayerCopyWither
UtilEnt.ghost(_ent, true, false);
UtilEnt.Vegetate(_ent);
UtilEnt.vegetate(_ent);
//Armor
_ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents());

View File

@ -1,7 +1,6 @@
package nautilus.game.arcade.game.modules.combatlog;
import net.minecraft.server.v1_8_R3.EntityCreeper;
import net.minecraft.server.v1_8_R3.EntitySkeleton;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilTime;
@ -15,14 +14,11 @@ import nautilus.game.arcade.ArcadeManager;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
public class CombatLogNPC
@ -147,7 +143,7 @@ public class CombatLogNPC
skel.setFallDistance(player.getFallDistance());
// fixme potion effects, mobs don't target, entity collision (setting to ghost disables arrows and fishing rods), logging while sleeping
// best solution to spawn EntityPlayer?
UtilEnt.Vegetate(skel);
UtilEnt.vegetate(skel);
UtilEnt.silence(skel, true);
skel.getEquipment().setHelmet(player.getInventory().getHelmet());

View File

@ -166,7 +166,7 @@ public abstract class Kit implements Listener
skel.setSkeletonType(SkeletonType.WITHER);
}
UtilEnt.Vegetate(entity, true);
UtilEnt.vegetate(entity, true);
UtilEnt.ghost(entity, true, false);
UtilEnt.setFakeHead(entity, true);

View File

@ -103,7 +103,7 @@ public class PerkHorsePet extends Perk
horse.setMaxHealth(40);
horse.setHealth(40);
UtilEnt.Vegetate(horse);
UtilEnt.vegetate(horse);
_horseMap.put(player, horse);

View File

@ -398,7 +398,7 @@ public class NewGameLobbyManager extends LobbyManager
ent.setColor(DyeColor.getByWoolData(team.GetColorData()));
UtilEnt.Vegetate(ent, true);
UtilEnt.vegetate(ent, true);
UtilEnt.setFakeHead(ent, true);
UtilEnt.ghost(ent, true, false);

View File

@ -81,7 +81,7 @@ public class LegacyGameLobbyManager extends LobbyManager
ent.setColor(DyeColor.getByWoolData(teams.get(i).GetColorData()));
UtilEnt.Vegetate(ent, true);
UtilEnt.vegetate(ent, true);
UtilEnt.setFakeHead(ent, true);
UtilEnt.ghost(ent, true, false);

View File

@ -625,7 +625,7 @@ public class MavericksReviewManager extends MiniPlugin
}
else
{
UtilEnt.Vegetate(e, true);
UtilEnt.vegetate(e, true);
UtilEnt.ghost(e, true, false);
}
}