Fixed armorstand balloon types
This commit is contained in:
parent
c685486086
commit
6478656501
@ -88,7 +88,7 @@ public class UtilEnt
|
|||||||
((CraftEntity)entity).getHandle().setInvisible(invisible);
|
((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);
|
leashed.setLeashHolder(holder);
|
||||||
|
|
||||||
@ -198,12 +198,12 @@ public class UtilEnt
|
|||||||
return box.b(box2);
|
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
|
try
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
package mineplex.core.gadget.gadgets.balloons;
|
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.Ageable;
|
||||||
import org.bukkit.entity.Bat;
|
import org.bukkit.entity.ArmorStand;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@ -11,9 +17,6 @@ import org.bukkit.potion.PotionEffect;
|
|||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilEnt;
|
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.GadgetManager;
|
||||||
import mineplex.core.gadget.types.BalloonGadget;
|
import mineplex.core.gadget.types.BalloonGadget;
|
||||||
|
|
||||||
@ -21,6 +24,7 @@ public class BalloonItem extends BalloonGadget
|
|||||||
{
|
{
|
||||||
|
|
||||||
private BalloonType _balloonType;
|
private BalloonType _balloonType;
|
||||||
|
private Map<UUID, List<Entity>> _entities = new HashMap<>();
|
||||||
|
|
||||||
public BalloonItem(GadgetManager manager, BalloonType balloonType)
|
public BalloonItem(GadgetManager manager, BalloonType balloonType)
|
||||||
{
|
{
|
||||||
@ -32,59 +36,69 @@ public class BalloonItem extends BalloonGadget
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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();
|
ArmorStand armorStand = player.getWorld().spawn(player.getLocation(), ArmorStand.class);
|
||||||
creatureModule.SetForce(true);
|
armorStand.setSmall(_balloonType.isBaby());
|
||||||
Entity silverfish = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
|
armorStand.setGravity(false);
|
||||||
UtilEnt.silence(silverfish, true);
|
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);
|
ents[1] = cow;
|
||||||
UtilEnt.Vegetate(silver, true);
|
|
||||||
UtilEnt.silence(silver, true);
|
|
||||||
silver.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
|
|
||||||
silverfish.setPassenger(silver);
|
|
||||||
|
|
||||||
Manager.getDisguiseManager().disguise(witherDisguise);
|
return ents;
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
else if (_balloonType.equals(BalloonType.BABY_ZOMBIE))
|
else if (_balloonType.equals(BalloonType.BABY_ZOMBIE))
|
||||||
{
|
{
|
||||||
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
||||||
zombie.setBaby(true);
|
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());
|
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
|
||||||
if (_balloonType.isBaby() && entity instanceof Ageable)
|
if (_balloonType.isBaby() && entity instanceof Ageable)
|
||||||
((Ageable) entity).setBaby();
|
((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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,25 +10,28 @@ import mineplex.core.common.util.UtilText;
|
|||||||
public enum BalloonType
|
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_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_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_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)),
|
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_OCELOT (EntityType.OCELOT, true, "Baby Ocelot Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0, new ItemStack(Material.GLASS)),
|
||||||
BABY_WIDDER(EntityType.SILVERFISH, "Baby Widder 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_OCELOT(EntityType.OCELOT, true, "Baby Ocelot 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_WOLF(EntityType.WOLF, true, "Baby Wolf 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_SHEEP(EntityType.SHEEP, true, "Baby Sheep 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)),
|
||||||
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)),
|
// NOT BABY
|
||||||
BAT(EntityType.BAT, "Bat 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)),
|
||||||
SILVERFISH(EntityType.SILVERFISH, "Silverfish 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)),
|
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),
|
// 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),
|
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),
|
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),
|
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);
|
EMERALD_BLOCK(new ItemStack(Material.EMERALD_BLOCK), false, "Emerald Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0);
|
||||||
|
|
||||||
private EntityType _entityType;
|
private EntityType _entityType;
|
||||||
|
@ -51,7 +51,7 @@ public class ItemFootball extends ItemGadget
|
|||||||
FallingBlock ball = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1, 0), Material.SKULL, (byte) 3);
|
FallingBlock ball = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1, 0), Material.SKULL, (byte) 3);
|
||||||
|
|
||||||
Bat bat = player.getWorld().spawn(player.getLocation(), Bat.class);
|
Bat bat = player.getWorld().spawn(player.getLocation(), Bat.class);
|
||||||
UtilEnt.Vegetate(bat);
|
UtilEnt.vegetate(bat);
|
||||||
UtilEnt.ghost(bat, true, true);
|
UtilEnt.ghost(bat, true, true);
|
||||||
UtilEnt.silence(bat, true);
|
UtilEnt.silence(bat, true);
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class WinEffectHalloween extends WinEffectGadget
|
|||||||
skeleton.setCustomNameVisible(true);
|
skeleton.setCustomNameVisible(true);
|
||||||
skeleton.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
|
skeleton.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
|
||||||
UtilEnt.ghost(skeleton, true, false);
|
UtilEnt.ghost(skeleton, true, false);
|
||||||
UtilEnt.Vegetate(skeleton);
|
UtilEnt.vegetate(skeleton);
|
||||||
for (int i = 0; i < 15; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
{
|
{
|
||||||
playFirework(skeleton.getLocation().clone().add(0, 2, 0), i, true);
|
playFirework(skeleton.getLocation().clone().add(0, 2, 0), i, true);
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
package mineplex.core.gadget.types;
|
package mineplex.core.gadget.types;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Bat;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
@ -24,11 +20,8 @@ import mineplex.core.updater.event.UpdateEvent;
|
|||||||
public abstract class BalloonGadget extends Gadget
|
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 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;
|
private EntityType _balloon;
|
||||||
|
|
||||||
public BalloonGadget(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data, EntityType balloon, String... altNames)
|
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;
|
return false;
|
||||||
|
|
||||||
PLAYER_BALLOONS.computeIfAbsent(player.getUniqueId(), map -> new HashMap<>());
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -84,17 +88,15 @@ public abstract class BalloonGadget extends Gadget
|
|||||||
{
|
{
|
||||||
if (PLAYER_BALLOONS.get(player.getUniqueId()).containsKey(_balloon))
|
if (PLAYER_BALLOONS.get(player.getUniqueId()).containsKey(_balloon))
|
||||||
{
|
{
|
||||||
BalloonData balloonData = PLAYER_BALLOONS.get(player.getUniqueId()).get(_balloon);
|
removeEntities(player);
|
||||||
Entity entity = balloonData.getBalloon();
|
|
||||||
entity.remove();
|
|
||||||
Bat bat = balloonData.getBat();
|
|
||||||
bat.remove();
|
|
||||||
PLAYER_BALLOONS.get(player.getUniqueId()).remove(_balloon);
|
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
|
@EventHandler
|
||||||
public void onUpdate(UpdateEvent event)
|
public void onUpdate(UpdateEvent event)
|
||||||
@ -116,17 +118,9 @@ public abstract class BalloonGadget extends Gadget
|
|||||||
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
|
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
|
||||||
{
|
{
|
||||||
Map<EntityType, BalloonData> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
|
Map<EntityType, BalloonData> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
|
||||||
if (balloonGadgets.containsKey(_balloon))
|
|
||||||
return false;
|
|
||||||
return balloonGadgets.size() < 10;
|
return balloonGadgets.size() < 10;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPlayerJoin(PlayerJoinEvent event)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
package mineplex.core.gadget.util;
|
package mineplex.core.gadget.util;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Bat;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffect;
|
|
||||||
import org.bukkit.potion.PotionEffectType;
|
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
|
||||||
public class BalloonData
|
public class BalloonData
|
||||||
@ -22,12 +18,11 @@ public class BalloonData
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private Player _player;
|
private Player _player;
|
||||||
private Entity _balloon;
|
private Entity _balloon, _passenger, _leash;
|
||||||
private Location _balloonLoc, _target;
|
private Location _balloonLoc, _target;
|
||||||
private Vector _direction;
|
private Vector _direction;
|
||||||
private double _speed;
|
private double _speed;
|
||||||
private long _idleTime;
|
private long _idleTime;
|
||||||
private Bat _bat;
|
|
||||||
|
|
||||||
public BalloonData(Player player, Entity balloon)
|
public BalloonData(Player player, Entity balloon)
|
||||||
{
|
{
|
||||||
@ -38,16 +33,35 @@ public class BalloonData
|
|||||||
_speed = 0.2;
|
_speed = 0.2;
|
||||||
_idleTime = 0;
|
_idleTime = 0;
|
||||||
_direction = new Vector(1, 0, 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()
|
public void update()
|
||||||
{
|
{
|
||||||
// Update bat
|
if (_leash == null)
|
||||||
_bat.teleport(_player.getLocation());
|
{
|
||||||
|
if (!((LivingEntity) _balloon).isLeashed())
|
||||||
if (((LivingEntity) _balloon).getLeashHolder() == null)
|
((LivingEntity) _balloon).setLeashHolder(_player);
|
||||||
((LivingEntity) _balloon).setLeashHolder(_bat);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!((LivingEntity) _leash).isLeashed())
|
||||||
|
((LivingEntity) _leash).setLeashHolder(_player);
|
||||||
|
}
|
||||||
|
|
||||||
//Update Target
|
//Update Target
|
||||||
if (UtilMath.offset(_player.getEyeLocation(), _target) > 3 || UtilMath.offset(_balloonLoc, _target) < 1)
|
if (UtilMath.offset(_player.getEyeLocation(), _target) > 3 || UtilMath.offset(_balloonLoc, _target) < 1)
|
||||||
@ -89,6 +103,15 @@ public class BalloonData
|
|||||||
|
|
||||||
_balloon.teleport(_balloonLoc);
|
_balloon.teleport(_balloonLoc);
|
||||||
_balloon.setVelocity(new Vector(0, .25, 0));
|
_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()
|
private Location getNewTarget()
|
||||||
@ -101,18 +124,10 @@ public class BalloonData
|
|||||||
return _balloon;
|
return _balloon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bat getBat()
|
public void setLeash(Entity leashedEntity)
|
||||||
{
|
{
|
||||||
return _bat;
|
_leash = leashedEntity;
|
||||||
}
|
((LivingEntity) _leash).setLeashHolder(_player);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ public class DisplaySlot
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(e, true);
|
UtilEnt.vegetate(e, true);
|
||||||
UtilEnt.ghost(e, true, false);
|
UtilEnt.ghost(e, true, false);
|
||||||
}
|
}
|
||||||
_pastedEntities.add(e);
|
_pastedEntities.add(e);
|
||||||
|
@ -44,7 +44,7 @@ public class DragonData extends MountData
|
|||||||
|
|
||||||
//Spawn Dragon
|
//Spawn Dragon
|
||||||
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
||||||
UtilEnt.Vegetate(Dragon);
|
UtilEnt.vegetate(Dragon);
|
||||||
UtilEnt.ghost(Dragon, true, false);
|
UtilEnt.ghost(Dragon, true, false);
|
||||||
|
|
||||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||||
|
@ -341,7 +341,7 @@ public class NpcManager extends MiniPlugin
|
|||||||
|
|
||||||
if (npc.getDatabaseRecord().getRadius() == 0)
|
if (npc.getDatabaseRecord().getRadius() == 0)
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(entity);
|
UtilEnt.vegetate(entity);
|
||||||
UtilEnt.silence(entity, true);
|
UtilEnt.silence(entity, true);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
|
|
||||||
@ -604,7 +604,7 @@ public class NpcManager extends MiniPlugin
|
|||||||
|
|
||||||
if (npc.getDatabaseRecord().getRadius() == 0)
|
if (npc.getDatabaseRecord().getRadius() == 0)
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(entity);
|
UtilEnt.vegetate(entity);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
|||||||
witherDisguise.setInvulTime(530);
|
witherDisguise.setInvulTime(530);
|
||||||
|
|
||||||
Creature silverfish = (Creature) _creatureModule.SpawnEntity(location, EntityType.SILVERFISH);
|
Creature silverfish = (Creature) _creatureModule.SpawnEntity(location, EntityType.SILVERFISH);
|
||||||
UtilEnt.Vegetate(silverfish, true);
|
UtilEnt.vegetate(silverfish, true);
|
||||||
UtilEnt.silence(silverfish, true);
|
UtilEnt.silence(silverfish, true);
|
||||||
silverfish.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
|
silverfish.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
|
||||||
pet.setPassenger(silverfish);
|
pet.setPassenger(silverfish);
|
||||||
@ -358,7 +358,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
|||||||
((Ageable)pet).setAgeLock(true);
|
((Ageable)pet).setAgeLock(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilEnt.Vegetate(pet);
|
UtilEnt.vegetate(pet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Creature getPet(Player player)
|
public Creature getPet(Player player)
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
package mineplex.game.clans.clans.siege.weapon;
|
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.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.ArmorStand;
|
import org.bukkit.entity.ArmorStand;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Slime;
|
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.ClansGame;
|
||||||
import mineplex.game.clans.clans.ClansManager;
|
import mineplex.game.clans.clans.ClansManager;
|
||||||
import mineplex.game.clans.clans.siege.SiegeManager;
|
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.repository.tokens.SiegeWeaponToken;
|
||||||
import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile;
|
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.AccessRule;
|
||||||
import mineplex.game.clans.clans.siege.weapon.util.AccessType;
|
import mineplex.game.clans.clans.siege.weapon.util.AccessType;
|
||||||
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
|
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
|
||||||
import mineplex.game.clans.core.repository.ClanTerritory;
|
|
||||||
|
|
||||||
public class Cannon extends SiegeWeapon
|
public class Cannon extends SiegeWeapon
|
||||||
{
|
{
|
||||||
@ -324,7 +317,7 @@ public class Cannon extends SiegeWeapon
|
|||||||
Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class);
|
Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class);
|
||||||
|
|
||||||
UtilEnt.silence(filler, true);
|
UtilEnt.silence(filler, true);
|
||||||
UtilEnt.Vegetate(filler);
|
UtilEnt.vegetate(filler);
|
||||||
|
|
||||||
filler.setSize(-1);
|
filler.setSize(-1);
|
||||||
filler.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
|
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);
|
Slime playerMount = _location.getWorld().spawn(_location.clone(), Slime.class);
|
||||||
|
|
||||||
UtilEnt.silence(playerMount, true);
|
UtilEnt.silence(playerMount, true);
|
||||||
UtilEnt.Vegetate(playerMount);
|
UtilEnt.vegetate(playerMount);
|
||||||
|
|
||||||
playerMount.setSize(-1);
|
playerMount.setSize(-1);
|
||||||
playerMount.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
|
playerMount.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
|
||||||
|
@ -195,7 +195,7 @@ public class CombatLogNPC
|
|||||||
skel.setMetadata("CombatLogNPC", new FixedMetadataValue(ClansManager.getInstance().getPlugin(), player.getUniqueId().toString()));
|
skel.setMetadata("CombatLogNPC", new FixedMetadataValue(ClansManager.getInstance().getPlugin(), player.getUniqueId().toString()));
|
||||||
skel.teleport(spawnLoc);
|
skel.teleport(spawnLoc);
|
||||||
skel.setHealth(_spawnHealth);
|
skel.setHealth(_spawnHealth);
|
||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.vegetate(skel);
|
||||||
UtilEnt.silence(skel, true);
|
UtilEnt.silence(skel, true);
|
||||||
|
|
||||||
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
||||||
|
@ -94,7 +94,7 @@ public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
|
|||||||
shooter.setCustomName(name);
|
shooter.setCustomName(name);
|
||||||
shooter.setCustomNameVisible(true);
|
shooter.setCustomNameVisible(true);
|
||||||
|
|
||||||
UtilEnt.Vegetate(shooter);
|
UtilEnt.vegetate(shooter);
|
||||||
|
|
||||||
shooter.teleport(location);
|
shooter.teleport(location);
|
||||||
shooter.setHealth(shooter.getMaxHealth());
|
shooter.setHealth(shooter.getMaxHealth());
|
||||||
|
@ -113,7 +113,7 @@ public class HalloweenSpookinessManager extends MiniPlugin
|
|||||||
Skeleton skeleton = loc.getWorld().spawn(loc, Skeleton.class);
|
Skeleton skeleton = loc.getWorld().spawn(loc, Skeleton.class);
|
||||||
|
|
||||||
UtilEnt.silence(skeleton, true);
|
UtilEnt.silence(skeleton, true);
|
||||||
UtilEnt.Vegetate(skeleton);
|
UtilEnt.vegetate(skeleton);
|
||||||
UtilEnt.ghost(skeleton, true, false);
|
UtilEnt.ghost(skeleton, true, false);
|
||||||
|
|
||||||
skeleton.getEquipment().setItemInHand(ItemStackFactory.Instance.CreateStack(0));
|
skeleton.getEquipment().setItemInHand(ItemStackFactory.Instance.CreateStack(0));
|
||||||
|
@ -159,7 +159,7 @@ public class SoccerManager extends MiniPlugin
|
|||||||
_ball = mid.getWorld().spawn(mid, Slime.class);
|
_ball = mid.getWorld().spawn(mid, Slime.class);
|
||||||
_ball.setSize(2);
|
_ball.setSize(2);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_ball);
|
UtilEnt.vegetate(_ball);
|
||||||
UtilEnt.ghost(_ball, true, false);
|
UtilEnt.ghost(_ball, true, false);
|
||||||
|
|
||||||
_ballVel = new Vector(0,-0.1,0);
|
_ballVel = new Vector(0,-0.1,0);
|
||||||
|
@ -97,7 +97,7 @@ public class BasketballGame implements Listener
|
|||||||
{
|
{
|
||||||
_velocity = -7;
|
_velocity = -7;
|
||||||
Entity e = loc.getWorld().spawnEntity(loc, EntityType.SLIME);
|
Entity e = loc.getWorld().spawnEntity(loc, EntityType.SLIME);
|
||||||
UtilEnt.Vegetate(e, true);
|
UtilEnt.vegetate(e, true);
|
||||||
UtilEnt.ghost(e, true, false);
|
UtilEnt.ghost(e, true, false);
|
||||||
((Slime)e).setSize(1);
|
((Slime)e).setSize(1);
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package mineplex.minecraft.game.classcombat.Skill.Assassin;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -17,7 +16,6 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
|
||||||
|
|
||||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
@ -95,7 +93,7 @@ public class Illusion extends SkillActive
|
|||||||
|
|
||||||
Skeleton skel = player.getWorld().spawn(player.getLocation(), Skeleton.class);
|
Skeleton skel = player.getWorld().spawn(player.getLocation(), Skeleton.class);
|
||||||
skel.teleport(player.getLocation());
|
skel.teleport(player.getLocation());
|
||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.vegetate(skel);
|
||||||
UtilEnt.silence(skel, true);
|
UtilEnt.silence(skel, true);
|
||||||
|
|
||||||
skel.setMaxHealth(14);
|
skel.setMaxHealth(14);
|
||||||
|
@ -91,7 +91,7 @@ public class RopedArrow extends SkillActive
|
|||||||
|
|
||||||
_arrows.add(event.getProjectile());
|
_arrows.add(event.getProjectile());
|
||||||
|
|
||||||
UtilEnt.Leash(player, event.getProjectile(), false, false);
|
UtilEnt.leash(player, event.getProjectile(), false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -5,7 +5,6 @@ import java.util.Collections;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -20,8 +19,6 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilBlock;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
@ -61,7 +58,7 @@ public class SpiderCreature extends EventCreature<Spider>
|
|||||||
@Override
|
@Override
|
||||||
protected void spawnCustom()
|
protected void spawnCustom()
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(getEntity());
|
UtilEnt.vegetate(getEntity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,7 +49,7 @@ public class SpiderMinionCreature extends EventCreature<CaveSpider>
|
|||||||
@Override
|
@Override
|
||||||
protected void spawnCustom()
|
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)));
|
getEntity().setVelocity(new Vector(UtilMath.rr(0.5, true), 0.4, UtilMath.rr(0.4, true)));
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ import org.bukkit.entity.IronGolem;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class GolemCreature extends EventCreature<IronGolem>
|
public class GolemCreature extends EventCreature<IronGolem>
|
||||||
@ -124,7 +123,7 @@ public class GolemCreature extends EventCreature<IronGolem>
|
|||||||
@Override
|
@Override
|
||||||
protected void spawnCustom()
|
protected void spawnCustom()
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(getEntity());
|
UtilEnt.vegetate(getEntity());
|
||||||
// EntityInsentient creature = (EntityInsentient) ((CraftEntity) getEntity()).getHandle();
|
// EntityInsentient creature = (EntityInsentient) ((CraftEntity) getEntity()).getHandle();
|
||||||
|
|
||||||
// creature.Vegetated = false;
|
// creature.Vegetated = false;
|
||||||
|
@ -79,7 +79,7 @@ public class SkeletonCreature extends EventCreature<Skeleton>
|
|||||||
@Override
|
@Override
|
||||||
protected void spawnCustom()
|
protected void spawnCustom()
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(getEntity());
|
UtilEnt.vegetate(getEntity());
|
||||||
getEntity().setSkeletonType(SkeletonType.WITHER);
|
getEntity().setSkeletonType(SkeletonType.WITHER);
|
||||||
getEntity().getEquipment().setItemInHand(new ItemStack(Material.RECORD_6)); //Meridian Scepter
|
getEntity().getEquipment().setItemInHand(new ItemStack(Material.RECORD_6)); //Meridian Scepter
|
||||||
getEntity().getEquipment().setItemInHandDropChance(0.f);
|
getEntity().getEquipment().setItemInHandDropChance(0.f);
|
||||||
|
@ -82,7 +82,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
|
|||||||
for (int i = 0; i < getBoss().Archers.size(); i++)
|
for (int i = 0; i < getBoss().Archers.size(); i++)
|
||||||
{
|
{
|
||||||
Skeleton archer = getBoss().Archers.get(i).getEntity();
|
Skeleton archer = getBoss().Archers.get(i).getEntity();
|
||||||
UtilEnt.Vegetate(archer);
|
UtilEnt.vegetate(archer);
|
||||||
((CraftSkeleton)archer).setVegetated(false);
|
((CraftSkeleton)archer).setVegetated(false);
|
||||||
|
|
||||||
double lead = i * ((2d * Math.PI)/getBoss().Archers.size());
|
double lead = i * ((2d * Math.PI)/getBoss().Archers.size());
|
||||||
@ -98,7 +98,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
|
|||||||
if (initial)
|
if (initial)
|
||||||
{
|
{
|
||||||
archer.teleport(getEntity().getLocation().add(oX, oY, oZ));
|
archer.teleport(getEntity().getLocation().add(oX, oY, oZ));
|
||||||
UtilEnt.Vegetate(archer);
|
UtilEnt.vegetate(archer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,7 @@ package mineplex.minecraft.game.core.boss.snake;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Effect;
|
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.UtilEnt;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilWorld;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.core.boss.EventCreature;
|
import mineplex.minecraft.game.core.boss.EventCreature;
|
||||||
@ -58,7 +55,7 @@ public class SnakeCreature extends EventCreature<Silverfish>
|
|||||||
protected void spawnCustom()
|
protected void spawnCustom()
|
||||||
{
|
{
|
||||||
getEntity().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 10000, 0));
|
getEntity().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 10000, 0));
|
||||||
UtilEnt.Vegetate(getEntity());
|
UtilEnt.vegetate(getEntity());
|
||||||
UtilEnt.ghost(getEntity(), true, false);
|
UtilEnt.ghost(getEntity(), true, false);
|
||||||
Vector dir = new Vector(UtilMath.rr(1, true), 0, UtilMath.rr(1, true)).normalize().multiply(_seperator);
|
Vector dir = new Vector(UtilMath.rr(1, true), 0, UtilMath.rr(1, true)).normalize().multiply(_seperator);
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class KitSheepPig extends ProgressingKit
|
|||||||
sheep.setColor(DyeColor.PINK);
|
sheep.setColor(DyeColor.PINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilEnt.Vegetate(entity);
|
UtilEnt.vegetate(entity);
|
||||||
|
|
||||||
SpawnCustom(entity);
|
SpawnCustom(entity);
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public class Basketball extends TeamGame
|
|||||||
this.CreatureAllowOverride = true;
|
this.CreatureAllowOverride = true;
|
||||||
_velocity = -7;
|
_velocity = -7;
|
||||||
Entity e = Manager.GetCreature().SpawnEntity(loc, EntityType.SLIME);
|
Entity e = Manager.GetCreature().SpawnEntity(loc, EntityType.SLIME);
|
||||||
UtilEnt.Vegetate(e, true);
|
UtilEnt.vegetate(e, true);
|
||||||
UtilEnt.ghost(e, true, false);
|
UtilEnt.ghost(e, true, false);
|
||||||
((Slime)e).setSize(1);
|
((Slime)e).setSize(1);
|
||||||
this.CreatureAllowOverride = false;
|
this.CreatureAllowOverride = false;
|
||||||
|
@ -8,8 +8,6 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.IronGolem;
|
import org.bukkit.entity.IronGolem;
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
|
||||||
|
|
||||||
public class IronWizardDisplay extends BossDisplay
|
public class IronWizardDisplay extends BossDisplay
|
||||||
{
|
{
|
||||||
@ -27,7 +25,7 @@ public class IronWizardDisplay extends BossDisplay
|
|||||||
_golem = (IronGolem) getLocation().getWorld().spawnEntity(getLocation(),
|
_golem = (IronGolem) getLocation().getWorld().spawnEntity(getLocation(),
|
||||||
EntityType.IRON_GOLEM);
|
EntityType.IRON_GOLEM);
|
||||||
_golem.teleport(getLocation());
|
_golem.teleport(getLocation());
|
||||||
UtilEnt.Vegetate(_golem);
|
UtilEnt.vegetate(_golem);
|
||||||
|
|
||||||
addEntity(_golem);
|
addEntity(_golem);
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.IronGolem;
|
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
|
||||||
|
|
||||||
public class SlimeKingDisplay extends BossDisplay
|
public class SlimeKingDisplay extends BossDisplay
|
||||||
{
|
{
|
||||||
@ -31,7 +28,7 @@ public class SlimeKingDisplay extends BossDisplay
|
|||||||
|
|
||||||
_slime.teleport(getLocation());
|
_slime.teleport(getLocation());
|
||||||
|
|
||||||
UtilEnt.Vegetate(_slime);
|
UtilEnt.vegetate(_slime);
|
||||||
|
|
||||||
addEntity(_slime);
|
addEntity(_slime);
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.IronGolem;
|
|
||||||
import org.bukkit.entity.Sheep;
|
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
|
public class SnakeDisplay extends BossDisplay
|
||||||
{
|
{
|
||||||
@ -30,7 +26,7 @@ public class SnakeDisplay extends BossDisplay
|
|||||||
|
|
||||||
_sheep.teleport(getLocation());
|
_sheep.teleport(getLocation());
|
||||||
|
|
||||||
UtilEnt.Vegetate(_sheep);
|
UtilEnt.vegetate(_sheep);
|
||||||
|
|
||||||
addEntity(_sheep);
|
addEntity(_sheep);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ public class SpiderDisplay extends BossDisplay
|
|||||||
Entity entity = getLocation().getWorld().spawnEntity(getLocation(),
|
Entity entity = getLocation().getWorld().spawnEntity(getLocation(),
|
||||||
EntityType.SPIDER);
|
EntityType.SPIDER);
|
||||||
|
|
||||||
UtilEnt.Vegetate(entity);
|
UtilEnt.vegetate(entity);
|
||||||
this.addEntity(entity);
|
this.addEntity(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ public class Ball
|
|||||||
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
||||||
_ball.setSize(2);
|
_ball.setSize(2);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_ball);
|
UtilEnt.vegetate(_ball);
|
||||||
UtilEnt.ghost(_ball, false, false);
|
UtilEnt.ghost(_ball, false, false);
|
||||||
_host.CreatureAllowOverride = false;
|
_host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class BuildData
|
|||||||
}
|
}
|
||||||
|
|
||||||
Entities.add(entity);
|
Entities.add(entity);
|
||||||
UtilEnt.Vegetate(entity, true);
|
UtilEnt.vegetate(entity, true);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class Sleigh
|
|||||||
Target = loc.clone();
|
Target = loc.clone();
|
||||||
|
|
||||||
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
|
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
|
||||||
UtilEnt.Vegetate(CentralEntity, true);
|
UtilEnt.vegetate(CentralEntity, true);
|
||||||
UtilEnt.ghost(CentralEntity, true, false);
|
UtilEnt.ghost(CentralEntity, true, false);
|
||||||
Host.Manager.GetCondition().Factory().Invisible("Sleigh", (LivingEntity) CentralEntity, null, Double.MAX_VALUE, 3, false, false, true);
|
Host.Manager.GetCondition().Factory().Invisible("Sleigh", (LivingEntity) CentralEntity, null, Double.MAX_VALUE, 3, false, false, true);
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ public class SleighHorse
|
|||||||
horseId = UtilEnt.getNewEntityId(false);
|
horseId = UtilEnt.getNewEntityId(false);
|
||||||
_previousDir = getAngles(_lastFacing.getYaw());
|
_previousDir = getAngles(_lastFacing.getYaw());
|
||||||
Ent = _lastFacing.getWorld().spawn(_lastFacing.subtract(0, 0.5, 0), Horse.class);
|
Ent = _lastFacing.getWorld().spawn(_lastFacing.subtract(0, 0.5, 0), Horse.class);
|
||||||
UtilEnt.Vegetate(Ent);
|
UtilEnt.vegetate(Ent);
|
||||||
UtilEnt.ghost(Ent, true, false);
|
UtilEnt.ghost(Ent, true, false);
|
||||||
Ent.setRemoveWhenFarAway(false);
|
Ent.setRemoveWhenFarAway(false);
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class SleighPart
|
|||||||
Ent.setAgeLock(true);
|
Ent.setAgeLock(true);
|
||||||
Ent.setRemoveWhenFarAway(false);
|
Ent.setRemoveWhenFarAway(false);
|
||||||
|
|
||||||
UtilEnt.Vegetate(Ent, true);
|
UtilEnt.vegetate(Ent, true);
|
||||||
UtilEnt.ghost(Ent, true, false);
|
UtilEnt.ghost(Ent, true, false);
|
||||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", Ent, null, Double.MAX_VALUE, 3, false, false, true);
|
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;
|
return null;
|
||||||
|
|
||||||
Skeleton skel = Ent.getWorld().spawn(Ent.getLocation().add(0, 1, 0), Skeleton.class);
|
Skeleton skel = Ent.getWorld().spawn(Ent.getLocation().add(0, 1, 0), Skeleton.class);
|
||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.vegetate(skel);
|
||||||
UtilEnt.ghost(skel, true, false);
|
UtilEnt.ghost(skel, true, false);
|
||||||
|
|
||||||
ItemStack head = new ItemStack(Material.LEATHER_HELMET);
|
ItemStack head = new ItemStack(Material.LEATHER_HELMET);
|
||||||
@ -169,7 +169,7 @@ public class SleighPart
|
|||||||
newTop.setAgeLock(true);
|
newTop.setAgeLock(true);
|
||||||
newTop.setRemoveWhenFarAway(false);
|
newTop.setRemoveWhenFarAway(false);
|
||||||
|
|
||||||
UtilEnt.Vegetate(newTop, true);
|
UtilEnt.vegetate(newTop, true);
|
||||||
UtilEnt.ghost(newTop, true, false);
|
UtilEnt.ghost(newTop, true, false);
|
||||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", newTop, null, Double.MAX_VALUE, 3, false, false, true);
|
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", newTop, null, Double.MAX_VALUE, 3, false, false, true);
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package nautilus.game.arcade.game.games.christmas.content;
|
package nautilus.game.arcade.game.games.christmas.content;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAction;
|
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.UtilMath;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
|
||||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||||
|
|
||||||
import org.bukkit.Effect;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -116,7 +114,7 @@ public class BossSnowmanPattern
|
|||||||
|
|
||||||
Location loc = _spawnA.get(i);
|
Location loc = _spawnA.get(i);
|
||||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.add(new BossSnowman(ent, loc, _aDir));
|
_ents.add(new BossSnowman(ent, loc, _aDir));
|
||||||
}
|
}
|
||||||
@ -129,7 +127,7 @@ public class BossSnowmanPattern
|
|||||||
|
|
||||||
Location loc = _spawnB.get(i);
|
Location loc = _spawnB.get(i);
|
||||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.add(new BossSnowman(ent, loc, _bDir));
|
_ents.add(new BossSnowman(ent, loc, _bDir));
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import nautilus.game.arcade.game.games.christmas.parts.Part4;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.Giant;
|
import org.bukkit.entity.Giant;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
@ -30,7 +29,7 @@ public class CaveGiant
|
|||||||
Host.Host.CreatureAllowOverride = true;
|
Host.Host.CreatureAllowOverride = true;
|
||||||
_ent = loc.getWorld().spawn(loc, Giant.class);
|
_ent = loc.getWorld().spawn(loc, Giant.class);
|
||||||
Host.Host.CreatureAllowOverride = false;
|
Host.Host.CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(_ent);
|
UtilEnt.vegetate(_ent);
|
||||||
|
|
||||||
_ent.setMaxHealth(300);
|
_ent.setMaxHealth(300);
|
||||||
_ent.setHealth(300);
|
_ent.setHealth(300);
|
||||||
|
@ -47,7 +47,7 @@ public class PumpkinKing
|
|||||||
Host.Host.CreatureAllowOverride = true;
|
Host.Host.CreatureAllowOverride = true;
|
||||||
_ent = UtilVariant.spawnWitherSkeleton(loc);
|
_ent = UtilVariant.spawnWitherSkeleton(loc);
|
||||||
Host.Host.CreatureAllowOverride = false;
|
Host.Host.CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(_ent);
|
UtilEnt.vegetate(_ent);
|
||||||
UtilEnt.ghost(_ent, true, false);
|
UtilEnt.ghost(_ent, true, false);
|
||||||
|
|
||||||
_ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
_ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||||
|
@ -51,7 +51,7 @@ public class SnowmanBoss
|
|||||||
_heart = _spawn.getWorld().spawn(_spawn, IronGolem.class);
|
_heart = _spawn.getWorld().spawn(_spawn, IronGolem.class);
|
||||||
_heart.setMaxHealth(1400);
|
_heart.setMaxHealth(1400);
|
||||||
_heart.setHealth(1400);
|
_heart.setHealth(1400);
|
||||||
UtilEnt.Vegetate(_heart);
|
UtilEnt.vegetate(_heart);
|
||||||
|
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ public class SnowmanMaze
|
|||||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.put(ent, new SnowmanWaypoint(ent.getLocation()));
|
_ents.put(ent, new SnowmanWaypoint(ent.getLocation()));
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class SnowmanMinion
|
|||||||
public SnowmanMinion(Snowman ent)
|
public SnowmanMinion(Snowman ent)
|
||||||
{
|
{
|
||||||
Ent = ent;
|
Ent = ent;
|
||||||
UtilEnt.Vegetate(Ent);
|
UtilEnt.vegetate(Ent);
|
||||||
Ent.setMaxHealth(100);
|
Ent.setMaxHealth(100);
|
||||||
Ent.setHealth(Ent.getMaxHealth());
|
Ent.setHealth(Ent.getMaxHealth());
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class SnowmanWaveA
|
|||||||
Host.CreatureAllowOverride = true;
|
Host.CreatureAllowOverride = true;
|
||||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.add(ent);
|
_ents.add(ent);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import java.util.Iterator;
|
|||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilTime;
|
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||||
@ -93,7 +92,7 @@ public class SnowmanWaveB
|
|||||||
Host.CreatureAllowOverride = true;
|
Host.CreatureAllowOverride = true;
|
||||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.add(ent);
|
_ents.add(ent);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public class DragonData
|
|||||||
//Spawn Dragon
|
//Spawn Dragon
|
||||||
manager.GetGame().CreatureAllowOverride = true;
|
manager.GetGame().CreatureAllowOverride = true;
|
||||||
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
||||||
UtilEnt.Vegetate(Dragon);
|
UtilEnt.vegetate(Dragon);
|
||||||
manager.GetGame().CreatureAllowOverride = false;
|
manager.GetGame().CreatureAllowOverride = false;
|
||||||
|
|
||||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||||
|
@ -155,7 +155,7 @@ public class Dragons extends SoloGame
|
|||||||
{
|
{
|
||||||
CreatureAllowOverride = true;
|
CreatureAllowOverride = true;
|
||||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
CreatureAllowOverride = false;
|
CreatureAllowOverride = false;
|
||||||
|
|
||||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||||
|
@ -156,7 +156,7 @@ public class DragonsTeams extends TeamGame
|
|||||||
{
|
{
|
||||||
CreatureAllowOverride = true;
|
CreatureAllowOverride = true;
|
||||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
CreatureAllowOverride = false;
|
CreatureAllowOverride = false;
|
||||||
|
|
||||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||||
|
@ -172,7 +172,7 @@ public class Gladiators extends SoloGame
|
|||||||
DisguisePlayer player = new DisguisePlayer(zombie, (zombie.equals(zombie1) ? tiger : random));
|
DisguisePlayer player = new DisguisePlayer(zombie, (zombie.equals(zombie1) ? tiger : random));
|
||||||
Manager.GetDisguise().disguise(player);
|
Manager.GetDisguise().disguise(player);
|
||||||
|
|
||||||
UtilEnt.Vegetate(zombie);
|
UtilEnt.vegetate(zombie);
|
||||||
zombie.getEquipment().setHelmet(ArenaType.ORANGE.getLoadout().getHelmet());
|
zombie.getEquipment().setHelmet(ArenaType.ORANGE.getLoadout().getHelmet());
|
||||||
zombie.getEquipment().setChestplate(ArenaType.ORANGE.getLoadout().getChestplate());
|
zombie.getEquipment().setChestplate(ArenaType.ORANGE.getLoadout().getChestplate());
|
||||||
zombie.getEquipment().setLeggings(ArenaType.ORANGE.getLoadout().getLeggings());
|
zombie.getEquipment().setLeggings(ArenaType.ORANGE.getLoadout().getLeggings());
|
||||||
|
@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|||||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
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.UtilServer;
|
||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import mineplex.core.common.util.UtilTime;
|
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.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
@ -333,12 +331,12 @@ public class Gravity extends SoloGame
|
|||||||
this.CreatureAllowOverride = false;
|
this.CreatureAllowOverride = false;
|
||||||
|
|
||||||
slime.setSize(1);
|
slime.setSize(1);
|
||||||
UtilEnt.Vegetate(slime, true);
|
UtilEnt.vegetate(slime, true);
|
||||||
UtilEnt.ghost(slime, true, false);
|
UtilEnt.ghost(slime, true, false);
|
||||||
|
|
||||||
GravityHook hook = new GravityHook(this, slime, 4, velocity);
|
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);
|
_hooks.put(player, hook);
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import mineplex.core.common.util.UtilParticle.ViewDist;
|
|||||||
import mineplex.core.disguise.disguises.DisguiseBat;
|
import mineplex.core.disguise.disguises.DisguiseBat;
|
||||||
import nautilus.game.arcade.game.games.gravity.objects.*;
|
import nautilus.game.arcade.game.games.gravity.objects.*;
|
||||||
|
|
||||||
import org.bukkit.Effect;
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -58,7 +57,7 @@ public abstract class GravityObject
|
|||||||
Bat.setSitting(true);
|
Bat.setSitting(true);
|
||||||
Host.Manager.GetDisguise().disguise(Bat);
|
Host.Manager.GetDisguise().disguise(Bat);
|
||||||
|
|
||||||
UtilEnt.Vegetate(Base, true);
|
UtilEnt.vegetate(Base, true);
|
||||||
//UtilEnt.ghost(Base, true, true);
|
//UtilEnt.ghost(Base, true, true);
|
||||||
Host.Manager.GetCondition().Factory().Invisible(null, Base, null, 9999, 1, false, false, false);
|
Host.Manager.GetCondition().Factory().Invisible(null, Base, null, 9999, 1, false, false, false);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ import nautilus.game.arcade.game.games.halloween.Halloween;
|
|||||||
import nautilus.game.arcade.game.games.halloween.HalloweenAudio;
|
import nautilus.game.arcade.game.games.halloween.HalloweenAudio;
|
||||||
import net.minecraft.server.v1_8_R3.EntityArrow;
|
import net.minecraft.server.v1_8_R3.EntityArrow;
|
||||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
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 net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||||
|
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
@ -391,7 +390,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
|||||||
|
|
||||||
_minions.add(skel);
|
_minions.add(skel);
|
||||||
|
|
||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.vegetate(skel);
|
||||||
}
|
}
|
||||||
|
|
||||||
_minionSpawn = false;
|
_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);
|
Blaze ent = GetEntity().getWorld().spawn(GetEntity().getLocation().add(0, 6, 0), Blaze.class);
|
||||||
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||||
_shields.add(ent);
|
_shields.add(ent);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
//ent.setSize(1);
|
//ent.setSize(1);
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ public class Halloween2016 extends Halloween
|
|||||||
CreatureAllowOverride = true;
|
CreatureAllowOverride = true;
|
||||||
ArmorStand bat = doorSchematicLocation.getWorld().spawn(doorSchematicLocation, ArmorStand.class);
|
ArmorStand bat = doorSchematicLocation.getWorld().spawn(doorSchematicLocation, ArmorStand.class);
|
||||||
CreatureAllowOverride = false;
|
CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(bat, true);
|
UtilEnt.vegetate(bat, true);
|
||||||
UtilEnt.setAI(bat, false);
|
UtilEnt.setAI(bat, false);
|
||||||
UtilEnt.setTickWhenFarAway(bat, true);
|
UtilEnt.setTickWhenFarAway(bat, true);
|
||||||
bat.setRemoveWhenFarAway(false);
|
bat.setRemoveWhenFarAway(false);
|
||||||
|
@ -57,7 +57,7 @@ public class MobGiant extends CryptBreaker<Giant>
|
|||||||
ent.setHealth(ent.getMaxHealth());
|
ent.setHealth(ent.getMaxHealth());
|
||||||
|
|
||||||
UtilEnt.setBoundingBox(_pathDummy, 0, 0);
|
UtilEnt.setBoundingBox(_pathDummy, 0, 0);
|
||||||
UtilEnt.Vegetate(_pathDummy, true);
|
UtilEnt.vegetate(_pathDummy, true);
|
||||||
UtilEnt.setStepHeight(_pathDummy, 1);
|
UtilEnt.setStepHeight(_pathDummy, 1);
|
||||||
|
|
||||||
//Prevent other mobs from pushing the giant
|
//Prevent other mobs from pushing the giant
|
||||||
|
@ -110,7 +110,7 @@ public class MobPumpkinPrince extends CreatureBase<Skeleton> implements Listener
|
|||||||
((CraftZombie)_horse).getHandle().b(true);
|
((CraftZombie)_horse).getHandle().b(true);
|
||||||
|
|
||||||
_horse.setPassenger(ent);
|
_horse.setPassenger(ent);
|
||||||
UtilEnt.Vegetate(_horse);
|
UtilEnt.vegetate(_horse);
|
||||||
|
|
||||||
UtilServer.RegisterEvents(this);
|
UtilServer.RegisterEvents(this);
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ public class MobWitch extends CreatureBase<Zombie>
|
|||||||
for(int i = 0; i < BATS_BURST; i++)
|
for(int i = 0; i < BATS_BURST; i++)
|
||||||
{
|
{
|
||||||
Bat bat = GetEntity().getWorld().spawn(GetEntity().getEyeLocation(), Bat.class);
|
Bat bat = GetEntity().getWorld().spawn(GetEntity().getEyeLocation(), Bat.class);
|
||||||
UtilEnt.Vegetate(bat);
|
UtilEnt.vegetate(bat);
|
||||||
_bats.add(bat);
|
_bats.add(bat);
|
||||||
addEntityPart(bat);
|
addEntityPart(bat);
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ public class WaveBoss extends WaveBase implements Listener
|
|||||||
_pumpkinKing.setCustomName(C.cYellow + C.Bold + "Pumpking King");
|
_pumpkinKing.setCustomName(C.cYellow + C.Bold + "Pumpking King");
|
||||||
_pumpkinKing.setCustomNameVisible(true);
|
_pumpkinKing.setCustomNameVisible(true);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_pumpkinKing);
|
UtilEnt.vegetate(_pumpkinKing);
|
||||||
|
|
||||||
_pumpkinKing.getWorld().strikeLightningEffect(_pumpkinKing.getLocation());
|
_pumpkinKing.getWorld().strikeLightningEffect(_pumpkinKing.getLocation());
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class Spawner
|
|||||||
if (canSpawnMob(l))
|
if (canSpawnMob(l))
|
||||||
{
|
{
|
||||||
Entity e = Host.getArcadeManager().GetCreature().SpawnEntity(l, _toSpawn);
|
Entity e = Host.getArcadeManager().GetCreature().SpawnEntity(l, _toSpawn);
|
||||||
UtilEnt.Vegetate(e);
|
UtilEnt.vegetate(e);
|
||||||
spawned = true;
|
spawned = true;
|
||||||
_lastSpawned = System.currentTimeMillis();
|
_lastSpawned = System.currentTimeMillis();
|
||||||
continue;
|
continue;
|
||||||
|
@ -24,7 +24,7 @@ public class PathfinderData
|
|||||||
{
|
{
|
||||||
Wither = wither;
|
Wither = wither;
|
||||||
UtilEnt.ghost(wither, true, false);
|
UtilEnt.ghost(wither, true, false);
|
||||||
UtilEnt.Vegetate(wither, false);
|
UtilEnt.vegetate(wither, false);
|
||||||
|
|
||||||
Location temp = wither.getLocation();
|
Location temp = wither.getLocation();
|
||||||
temp.setPitch(UtilAlg.GetPitch(UtilAlg.getTrajectory(wither.getLocation(), target)));
|
temp.setPitch(UtilAlg.GetPitch(UtilAlg.getTrajectory(wither.getLocation(), target)));
|
||||||
|
@ -125,7 +125,7 @@ public class WitherMinionManager implements Listener
|
|||||||
Skeleton e = UtilVariant.spawnWitherSkeleton(chosen);
|
Skeleton e = UtilVariant.spawnWitherSkeleton(chosen);
|
||||||
_entity = (Skeleton)e;
|
_entity = (Skeleton)e;
|
||||||
UtilEnt.ghost(e, true, false);
|
UtilEnt.ghost(e, true, false);
|
||||||
UtilEnt.Vegetate(e);
|
UtilEnt.vegetate(e);
|
||||||
e.setCustomName(C.cRed + "Wither Skeleton");
|
e.setCustomName(C.cRed + "Wither Skeleton");
|
||||||
((Skeleton)e).setMaxHealth(/*100*/65);
|
((Skeleton)e).setMaxHealth(/*100*/65);
|
||||||
((Skeleton)e).setHealth(/*100*/65);
|
((Skeleton)e).setHealth(/*100*/65);
|
||||||
|
@ -35,7 +35,7 @@ public class ZombieWrapper
|
|||||||
|
|
||||||
_wrapper = (Zombie) world.spawnEntity(center.clone().add(0.5, 1, 0.5), EntityType.ZOMBIE);
|
_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);
|
UtilEnt.ghost(_wrapper, true, false);
|
||||||
|
|
||||||
_wrapper.setCustomName(C.cRedB + "Infected Zombie");
|
_wrapper.setCustomName(C.cRedB + "Infected Zombie");
|
||||||
|
@ -230,7 +230,7 @@ public class ChallengeRedLightGreenLight extends Challenge
|
|||||||
Location spawn = getCenter().add(VILLAGER_X, MAP_HEIGHT, 0);
|
Location spawn = getCenter().add(VILLAGER_X, MAP_HEIGHT, 0);
|
||||||
_villager = (Villager) getCenter().getWorld().spawnEntity(spawn, EntityType.VILLAGER);
|
_villager = (Villager) getCenter().getWorld().spawnEntity(spawn, EntityType.VILLAGER);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_villager);
|
UtilEnt.vegetate(_villager);
|
||||||
UtilEnt.CreatureLook(_villager, Host.GetSpectatorLocation());
|
UtilEnt.CreatureLook(_villager, Host.GetSpectatorLocation());
|
||||||
UtilEnt.ghost(_villager, true, false);
|
UtilEnt.ghost(_villager, true, false);
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ public class ChallengeVolleyPig extends TeamChallenge
|
|||||||
getCenter().add(PIG_CENTER_X, PIG_CENTER_Y, PIG_CENTER_Z).subtract(getArenaSize(), 0, 0),
|
getCenter().add(PIG_CENTER_X, PIG_CENTER_Y, PIG_CENTER_Z).subtract(getArenaSize(), 0, 0),
|
||||||
Pig.class);
|
Pig.class);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_pig);
|
UtilEnt.vegetate(_pig);
|
||||||
|
|
||||||
Host.CreatureAllow = false;
|
Host.CreatureAllow = false;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package nautilus.game.arcade.game.games.monsterleague;
|
package nautilus.game.arcade.game.games.monsterleague;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
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.GameTeam;
|
||||||
import nautilus.game.arcade.game.games.monsterleague.kits.LeagueKit;
|
import nautilus.game.arcade.game.games.monsterleague.kits.LeagueKit;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.EntityEffect;
|
import org.bukkit.EntityEffect;
|
||||||
@ -159,7 +157,7 @@ public class Ball
|
|||||||
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
||||||
_ball.setSize(2);
|
_ball.setSize(2);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_ball);
|
UtilEnt.vegetate(_ball);
|
||||||
UtilEnt.ghost(_ball, false, false);
|
UtilEnt.ghost(_ball, false, false);
|
||||||
_host.CreatureAllowOverride = false;
|
_host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ public class Maze implements Listener
|
|||||||
|
|
||||||
_host.CreatureAllowOverride = false;
|
_host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent, true);
|
UtilEnt.vegetate(ent, true);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ public class Maze implements Listener
|
|||||||
|
|
||||||
_host.CreatureAllowOverride = false;
|
_host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent, true);
|
UtilEnt.vegetate(ent, true);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class PlayerCopyPaintball
|
|||||||
|
|
||||||
UtilEnt.ghost(_ent, true, false);
|
UtilEnt.ghost(_ent, true, false);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_ent);
|
UtilEnt.vegetate(_ent);
|
||||||
|
|
||||||
_ent.setArms(true);
|
_ent.setArms(true);
|
||||||
_ent.setBasePlate(false);
|
_ent.setBasePlate(false);
|
||||||
|
@ -57,7 +57,7 @@ public class SheepData
|
|||||||
StuckLocation = Sheep.getLocation();
|
StuckLocation = Sheep.getLocation();
|
||||||
StuckTime = System.currentTimeMillis();
|
StuckTime = System.currentTimeMillis();
|
||||||
|
|
||||||
UtilEnt.Vegetate(Sheep);
|
UtilEnt.vegetate(Sheep);
|
||||||
UtilEnt.ghost(Sheep, true, false);
|
UtilEnt.ghost(Sheep, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class PerkChickenRocket extends SmashPerk
|
|||||||
ent.getLocation().setYaw(player.getLocation().getYaw());
|
ent.getLocation().setYaw(player.getLocation().getYaw());
|
||||||
ent.setBaby();
|
ent.setBaby();
|
||||||
ent.setAgeLock(true);
|
ent.setAgeLock(true);
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
Manager.GetGame().CreatureAllowOverride = false;
|
Manager.GetGame().CreatureAllowOverride = false;
|
||||||
|
|
||||||
_data.add(new ChickenMissileData(player, ent));
|
_data.add(new ChickenMissileData(player, ent));
|
||||||
|
@ -54,7 +54,7 @@ public class SmashEnderman extends SmashUltimate
|
|||||||
|
|
||||||
Manager.GetGame().CreatureAllowOverride = true;
|
Manager.GetGame().CreatureAllowOverride = true;
|
||||||
EnderDragon dragon = player.getWorld().spawn(player.getLocation().add(0, 5, 0), EnderDragon.class);
|
EnderDragon dragon = player.getWorld().spawn(player.getLocation().add(0, 5, 0), EnderDragon.class);
|
||||||
UtilEnt.Vegetate(dragon);
|
UtilEnt.vegetate(dragon);
|
||||||
Manager.GetGame().CreatureAllowOverride = false;
|
Manager.GetGame().CreatureAllowOverride = false;
|
||||||
|
|
||||||
dragon.setCustomName(C.cYellow + player.getName() + "'s Dragon");
|
dragon.setCustomName(C.cYellow + player.getName() + "'s Dragon");
|
||||||
|
@ -125,7 +125,7 @@ public class PerkPigBaconBomb extends SmashPerk
|
|||||||
Manager.GetGame().CreatureAllowOverride = false;
|
Manager.GetGame().CreatureAllowOverride = false;
|
||||||
|
|
||||||
pig.setBaby();
|
pig.setBaby();
|
||||||
UtilEnt.Vegetate(pig);
|
UtilEnt.vegetate(pig);
|
||||||
UtilEnt.ghost(pig, true, false);
|
UtilEnt.ghost(pig, true, false);
|
||||||
|
|
||||||
UUID key = player.getUniqueId();
|
UUID key = player.getUniqueId();
|
||||||
|
@ -69,7 +69,7 @@ public class SmashSnowman extends SmashUltimate
|
|||||||
Snowman ent = player.getWorld().spawn(player.getEyeLocation(), Snowman.class);
|
Snowman ent = player.getWorld().spawn(player.getEyeLocation(), Snowman.class);
|
||||||
game.CreatureAllowOverride = false;
|
game.CreatureAllowOverride = false;
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent);
|
UtilEnt.vegetate(ent);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
|
|
||||||
ent.setMaxHealth(TURRET_HEALTH);
|
ent.setMaxHealth(TURRET_HEALTH);
|
||||||
|
@ -113,7 +113,7 @@ public class PerkWolf extends SmashPerk
|
|||||||
|
|
||||||
wolf.setAngry(true);
|
wolf.setAngry(true);
|
||||||
|
|
||||||
UtilEnt.Vegetate(wolf);
|
UtilEnt.vegetate(wolf);
|
||||||
|
|
||||||
wolf.setMaxHealth(WOLF_HEALTH);
|
wolf.setMaxHealth(WOLF_HEALTH);
|
||||||
wolf.setHealth(wolf.getMaxHealth());
|
wolf.setHealth(wolf.getMaxHealth());
|
||||||
|
@ -12,7 +12,6 @@ import org.bukkit.EntityEffect;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
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.EntityCombustEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.event.player.PlayerEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.util.Vector;
|
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.C;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilBlock;
|
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.GamePrepareCountdownCommence;
|
||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
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.SlimeUpgradeEvent;
|
||||||
import nautilus.game.arcade.game.games.snake.events.TailGrowEvent;
|
import nautilus.game.arcade.game.games.snake.events.TailGrowEvent;
|
||||||
import nautilus.game.arcade.game.games.snake.kits.KitInvulnerable;
|
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.setColor(DyeColor.getByDyeData((byte) (i % 16)));
|
||||||
sheep.setPassenger(player);
|
sheep.setPassenger(player);
|
||||||
|
|
||||||
UtilEnt.Vegetate(sheep);
|
UtilEnt.vegetate(sheep);
|
||||||
|
|
||||||
_tail.put(player, new ArrayList<Creature>());
|
_tail.put(player, new ArrayList<Creature>());
|
||||||
_tail.get(player).add(sheep);
|
_tail.get(player).add(sheep);
|
||||||
@ -384,7 +378,7 @@ public class Snake extends SoloGame
|
|||||||
Slime pig = loc.getWorld().spawn(loc, Slime.class);
|
Slime pig = loc.getWorld().spawn(loc, Slime.class);
|
||||||
this.CreatureAllowOverride = false;
|
this.CreatureAllowOverride = false;
|
||||||
pig.setSize(2);
|
pig.setSize(2);
|
||||||
UtilEnt.Vegetate(pig);
|
UtilEnt.vegetate(pig);
|
||||||
|
|
||||||
_food.add(pig);
|
_food.add(pig);
|
||||||
}
|
}
|
||||||
@ -454,7 +448,7 @@ public class Snake extends SoloGame
|
|||||||
//Sets yaw/pitch
|
//Sets yaw/pitch
|
||||||
tail.teleport(loc);
|
tail.teleport(loc);
|
||||||
|
|
||||||
UtilEnt.Vegetate(tail);
|
UtilEnt.vegetate(tail);
|
||||||
UtilEnt.ghost(tail, true, false);
|
UtilEnt.ghost(tail, true, false);
|
||||||
|
|
||||||
_tail.get(player).add(tail);
|
_tail.get(player).add(tail);
|
||||||
|
@ -52,7 +52,7 @@ public class NpcManager implements Listener
|
|||||||
LivingEntity npc = (LivingEntity) spawn.getWorld().spawn(spawn, getDisguiseType().getEntityClass());
|
LivingEntity npc = (LivingEntity) spawn.getWorld().spawn(spawn, getDisguiseType().getEntityClass());
|
||||||
npc.setCanPickupItems(false);
|
npc.setCanPickupItems(false);
|
||||||
npc.setRemoveWhenFarAway(false);
|
npc.setRemoveWhenFarAway(false);
|
||||||
UtilEnt.Vegetate(npc);
|
UtilEnt.vegetate(npc);
|
||||||
getGame().CreatureAllowOverride = false;
|
getGame().CreatureAllowOverride = false;
|
||||||
|
|
||||||
return npc;
|
return npc;
|
||||||
|
@ -9,11 +9,9 @@ import mineplex.core.updater.event.*;
|
|||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
import org.bukkit.block.*;
|
import org.bukkit.block.*;
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
|
||||||
import org.bukkit.inventory.*;
|
import org.bukkit.inventory.*;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Tim on 8/5/2014.
|
* Created by Tim on 8/5/2014.
|
||||||
@ -106,7 +104,7 @@ public class PowerUpItem
|
|||||||
_powerUpManager.getGame().CreatureAllowOverride = true;
|
_powerUpManager.getGame().CreatureAllowOverride = true;
|
||||||
_npc = itemLocation.getWorld().spawn(itemLocation, Skeleton.class);
|
_npc = itemLocation.getWorld().spawn(itemLocation, Skeleton.class);
|
||||||
_powerUpManager.getGame().CreatureAllowOverride = false;
|
_powerUpManager.getGame().CreatureAllowOverride = false;
|
||||||
UtilEnt.Vegetate(_npc);
|
UtilEnt.vegetate(_npc);
|
||||||
UtilEnt.ghost(_npc, true, false);
|
UtilEnt.ghost(_npc, true, false);
|
||||||
|
|
||||||
_npc.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
_npc.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
||||||
|
@ -340,7 +340,7 @@ public class SpeedBuilders extends SoloGame
|
|||||||
|
|
||||||
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
||||||
|
|
||||||
UtilEnt.Vegetate(entity, true);
|
UtilEnt.vegetate(entity, true);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
|
|
||||||
_middleMobs.add(entity);
|
_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);
|
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);
|
UtilEnt.ghost(entity, true, false);
|
||||||
|
|
||||||
CreatureAllowOverride = false;
|
CreatureAllowOverride = false;
|
||||||
|
@ -191,7 +191,7 @@ public class RecreationData
|
|||||||
|
|
||||||
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
||||||
|
|
||||||
UtilEnt.Vegetate(entity, true);
|
UtilEnt.vegetate(entity, true);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
|
|
||||||
Mobs.add(entity);
|
Mobs.add(entity);
|
||||||
|
@ -314,7 +314,7 @@ public class Minion
|
|||||||
|
|
||||||
private void path()
|
private void path()
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(_entity);
|
UtilEnt.vegetate(_entity);
|
||||||
UtilEnt.silence(_entity, true);
|
UtilEnt.silence(_entity, true);
|
||||||
UtilEnt.ghost(_entity, true, false);
|
UtilEnt.ghost(_entity, true, false);
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ public class TypeWars extends TeamGame
|
|||||||
_giantLocs.put(giant, loc.clone());
|
_giantLocs.put(giant, loc.clone());
|
||||||
this.CreatureAllowOverride = false;
|
this.CreatureAllowOverride = false;
|
||||||
giant.setRemoveWhenFarAway(false);
|
giant.setRemoveWhenFarAway(false);
|
||||||
UtilEnt.Vegetate(giant, true);
|
UtilEnt.vegetate(giant, true);
|
||||||
UtilEnt.ghost(giant, true, false);
|
UtilEnt.ghost(giant, true, false);
|
||||||
|
|
||||||
ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);
|
ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);
|
||||||
|
@ -18,7 +18,6 @@ import mineplex.core.common.util.UtilTextBottom;
|
|||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.core.noteblock.INoteVerifier;
|
|
||||||
import mineplex.core.noteblock.NBSReader;
|
import mineplex.core.noteblock.NBSReader;
|
||||||
import mineplex.core.noteblock.NotePlayer;
|
import mineplex.core.noteblock.NotePlayer;
|
||||||
import mineplex.core.noteblock.NoteSong;
|
import mineplex.core.noteblock.NoteSong;
|
||||||
@ -167,7 +166,7 @@ public class Valentines extends SoloGame
|
|||||||
_cow.setCustomName(C.cGreen + C.Bold + _cowName);
|
_cow.setCustomName(C.cGreen + C.Bold + _cowName);
|
||||||
_cow.setCustomNameVisible(true);
|
_cow.setCustomNameVisible(true);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_cow);
|
UtilEnt.vegetate(_cow);
|
||||||
UtilEnt.ghost(_cow, true, false);
|
UtilEnt.ghost(_cow, true, false);
|
||||||
CreatureAllowOverride = false;
|
CreatureAllowOverride = false;
|
||||||
}
|
}
|
||||||
@ -410,7 +409,7 @@ public class Valentines extends SoloGame
|
|||||||
Pig pig = loc.getWorld().spawn(loc, Pig.class);
|
Pig pig = loc.getWorld().spawn(loc, Pig.class);
|
||||||
_pigs.put(pig, pig.getLocation());
|
_pigs.put(pig, pig.getLocation());
|
||||||
|
|
||||||
UtilEnt.Vegetate(pig);
|
UtilEnt.vegetate(pig);
|
||||||
|
|
||||||
//Give Item
|
//Give Item
|
||||||
if (toSpawn > 1)
|
if (toSpawn > 1)
|
||||||
|
@ -20,7 +20,6 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
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.game.games.valentines.Valentines;
|
||||||
import nautilus.game.arcade.gametutorial.GameTutorial;
|
import nautilus.game.arcade.gametutorial.GameTutorial;
|
||||||
import nautilus.game.arcade.gametutorial.TutorialPhase;
|
import nautilus.game.arcade.gametutorial.TutorialPhase;
|
||||||
@ -110,7 +109,7 @@ public class TutorialValentines extends GameTutorial
|
|||||||
|
|
||||||
//Spawn
|
//Spawn
|
||||||
Pig pig = _pigSpawn.getWorld().spawn(_pigSpawn, Pig.class);
|
Pig pig = _pigSpawn.getWorld().spawn(_pigSpawn, Pig.class);
|
||||||
UtilEnt.Vegetate(pig);
|
UtilEnt.vegetate(pig);
|
||||||
|
|
||||||
|
|
||||||
//Item
|
//Item
|
||||||
@ -183,12 +182,12 @@ public class TutorialValentines extends GameTutorial
|
|||||||
_cowBoy = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("BROWN").get(0), Cow.class);
|
_cowBoy = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("BROWN").get(0), Cow.class);
|
||||||
_cowBoy.setCustomName(C.cGreenB + "Calvin");
|
_cowBoy.setCustomName(C.cGreenB + "Calvin");
|
||||||
_cowBoy.setCustomNameVisible(true);
|
_cowBoy.setCustomNameVisible(true);
|
||||||
UtilEnt.Vegetate(_cowBoy);
|
UtilEnt.vegetate(_cowBoy);
|
||||||
|
|
||||||
_cowGirl = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("RED").get(0), MushroomCow.class);
|
_cowGirl = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("RED").get(0), MushroomCow.class);
|
||||||
_cowGirl.setCustomName(C.cRedB + "Moolanie");
|
_cowGirl.setCustomName(C.cRedB + "Moolanie");
|
||||||
_cowGirl.setCustomNameVisible(true);
|
_cowGirl.setCustomNameVisible(true);
|
||||||
UtilEnt.Vegetate(_cowGirl);
|
UtilEnt.vegetate(_cowGirl);
|
||||||
|
|
||||||
Host.CreatureAllowOverride = false;
|
Host.CreatureAllowOverride = false;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public class PlayerCopyWither
|
|||||||
|
|
||||||
UtilEnt.ghost(_ent, true, false);
|
UtilEnt.ghost(_ent, true, false);
|
||||||
|
|
||||||
UtilEnt.Vegetate(_ent);
|
UtilEnt.vegetate(_ent);
|
||||||
|
|
||||||
//Armor
|
//Armor
|
||||||
_ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents());
|
_ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents());
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package nautilus.game.arcade.game.modules.combatlog;
|
package nautilus.game.arcade.game.modules.combatlog;
|
||||||
|
|
||||||
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
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.UtilEnt;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
@ -15,14 +14,11 @@ import nautilus.game.arcade.ArcadeManager;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
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.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
|
|
||||||
public class CombatLogNPC
|
public class CombatLogNPC
|
||||||
@ -147,7 +143,7 @@ public class CombatLogNPC
|
|||||||
skel.setFallDistance(player.getFallDistance());
|
skel.setFallDistance(player.getFallDistance());
|
||||||
// fixme potion effects, mobs don't target, entity collision (setting to ghost disables arrows and fishing rods), logging while sleeping
|
// 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?
|
// best solution to spawn EntityPlayer?
|
||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.vegetate(skel);
|
||||||
UtilEnt.silence(skel, true);
|
UtilEnt.silence(skel, true);
|
||||||
|
|
||||||
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
||||||
|
@ -166,7 +166,7 @@ public abstract class Kit implements Listener
|
|||||||
skel.setSkeletonType(SkeletonType.WITHER);
|
skel.setSkeletonType(SkeletonType.WITHER);
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilEnt.Vegetate(entity, true);
|
UtilEnt.vegetate(entity, true);
|
||||||
UtilEnt.ghost(entity, true, false);
|
UtilEnt.ghost(entity, true, false);
|
||||||
UtilEnt.setFakeHead(entity, true);
|
UtilEnt.setFakeHead(entity, true);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class PerkHorsePet extends Perk
|
|||||||
horse.setMaxHealth(40);
|
horse.setMaxHealth(40);
|
||||||
horse.setHealth(40);
|
horse.setHealth(40);
|
||||||
|
|
||||||
UtilEnt.Vegetate(horse);
|
UtilEnt.vegetate(horse);
|
||||||
|
|
||||||
_horseMap.put(player, horse);
|
_horseMap.put(player, horse);
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ public class NewGameLobbyManager extends LobbyManager
|
|||||||
|
|
||||||
ent.setColor(DyeColor.getByWoolData(team.GetColorData()));
|
ent.setColor(DyeColor.getByWoolData(team.GetColorData()));
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent, true);
|
UtilEnt.vegetate(ent, true);
|
||||||
UtilEnt.setFakeHead(ent, true);
|
UtilEnt.setFakeHead(ent, true);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class LegacyGameLobbyManager extends LobbyManager
|
|||||||
|
|
||||||
ent.setColor(DyeColor.getByWoolData(teams.get(i).GetColorData()));
|
ent.setColor(DyeColor.getByWoolData(teams.get(i).GetColorData()));
|
||||||
|
|
||||||
UtilEnt.Vegetate(ent, true);
|
UtilEnt.vegetate(ent, true);
|
||||||
UtilEnt.setFakeHead(ent, true);
|
UtilEnt.setFakeHead(ent, true);
|
||||||
UtilEnt.ghost(ent, true, false);
|
UtilEnt.ghost(ent, true, false);
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ public class MavericksReviewManager extends MiniPlugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilEnt.Vegetate(e, true);
|
UtilEnt.vegetate(e, true);
|
||||||
UtilEnt.ghost(e, true, false);
|
UtilEnt.ghost(e, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user