Merge branch 'update/cosmetics-balloons' into develop
This commit is contained in:
commit
cea08cae67
@ -6,6 +6,25 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R3.EntityBat;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.EntityEnderDragon;
|
||||
import net.minecraft.server.v1_8_R3.EntityHuman;
|
||||
import net.minecraft.server.v1_8_R3.EntityInsentient;
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_8_R3.NBTTagCompound;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntity;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityHeadRotation;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoal;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalLookAtPlayer;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalMoveTowardsRestriction;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalRandomLookaround;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalSelector;
|
||||
import net.minecraft.server.v1_8_R3.WorldServer;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -29,24 +48,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R3.EntityBat;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.EntityEnderDragon;
|
||||
import net.minecraft.server.v1_8_R3.EntityHuman;
|
||||
import net.minecraft.server.v1_8_R3.EntityInsentient;
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntity;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityHeadRotation;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoal;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalLookAtPlayer;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalMoveTowardsRestriction;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalRandomLookaround;
|
||||
import net.minecraft.server.v1_8_R3.PathfinderGoalSelector;
|
||||
import net.minecraft.server.v1_8_R3.WorldServer;
|
||||
|
||||
public class UtilEnt
|
||||
{
|
||||
|
||||
@ -67,7 +68,13 @@ public class UtilEnt
|
||||
|
||||
public static void silence(Entity entity, boolean silence)
|
||||
{
|
||||
((CraftEntity)entity).getHandle().setSilent(silence);
|
||||
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
nmsEntity.c(tag);
|
||||
tag.setByte("Silent", (byte) ((silence) ? 1 : 0));
|
||||
nmsEntity.f(tag);
|
||||
// Not working right now
|
||||
//((CraftEntity)entity).getHandle().setSilent(silence);
|
||||
}
|
||||
|
||||
public static void ghost(Entity entity, boolean ghost, boolean invisible)
|
||||
@ -81,7 +88,7 @@ public class UtilEnt
|
||||
((CraftEntity)entity).getHandle().setInvisible(invisible);
|
||||
}
|
||||
|
||||
public static void Leash(LivingEntity leashed, Entity holder, boolean pull, boolean breakable)
|
||||
public static void leash(LivingEntity leashed, Entity holder, boolean pull, boolean breakable)
|
||||
{
|
||||
leashed.setLeashHolder(holder);
|
||||
|
||||
@ -191,12 +198,12 @@ public class UtilEnt
|
||||
return box.b(box2);
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity)
|
||||
public static void vegetate(Entity entity)
|
||||
{
|
||||
Vegetate(entity, false);
|
||||
vegetate(entity, false);
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity, boolean mute)
|
||||
public static void vegetate(Entity entity, boolean mute)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1,9 +1,11 @@
|
||||
package mineplex.core.cosmetic.ui.button.open;
|
||||
|
||||
import mineplex.core.cosmetic.ui.page.BalloonsPage;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.cosmetic.ui.page.Menu;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class OpenBalloons extends OpenPageButton
|
||||
{
|
||||
@ -16,7 +18,8 @@ public class OpenBalloons extends OpenPageButton
|
||||
@Override
|
||||
protected void leftClick(Player player)
|
||||
{
|
||||
getMenu().getShop().openPageForPlayer(player, new BalloonsPage(getMenu().getPlugin(), getMenu().getShop(), getMenu().getClientManager(), getMenu().getDonationManager(), "Win Effects", player));
|
||||
UtilPlayer.message(player, F.main("Balloons", "Coming Soon!"));
|
||||
//getMenu().getShop().openPageForPlayer(player, new BalloonsPage(getMenu().getPlugin(), getMenu().getShop(), getMenu().getClientManager(), getMenu().getDonationManager(), "Balloons", player));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class BalloonsPage extends GadgetPage
|
||||
{
|
||||
addGadget(gadget, slot);
|
||||
|
||||
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.BALLOON) == gadget)
|
||||
if (gadget.isActive(getPlayer()))
|
||||
addGlow(slot);
|
||||
|
||||
slot++;
|
||||
|
@ -14,9 +14,11 @@ import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilUI;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.cosmetic.ui.CosmeticShop;
|
||||
import mineplex.core.cosmetic.ui.button.open.OpenArrowTrails;
|
||||
import mineplex.core.cosmetic.ui.button.open.OpenBalloons;
|
||||
import mineplex.core.cosmetic.ui.button.open.OpenCostumes;
|
||||
import mineplex.core.cosmetic.ui.button.open.OpenDeathAnimations;
|
||||
import mineplex.core.cosmetic.ui.button.open.OpenDoubleJump;
|
||||
@ -40,6 +42,11 @@ import mineplex.core.shop.page.ShopPageBase;
|
||||
|
||||
public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
{
|
||||
|
||||
private static final String VISIBILITY_HUB = "Usable in Lobbies";
|
||||
private static final String VISIBILITY_EVERYWHERE = "Visible Everywhere";
|
||||
private static final String VISIBILITY_GAMES = "Visible in Games";
|
||||
|
||||
public Menu(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Inventory", player);
|
||||
@ -62,11 +69,11 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
addItem(4, shards);
|
||||
|
||||
// Cosmetic Items
|
||||
// int[] slots = UtilUI.getIndicesFor(12, 2);
|
||||
int particleSlot = 10;//slots[0];
|
||||
int arrowSlot = 12;//slots[1];
|
||||
int jumpSlot = 14;//slots[2];
|
||||
int deathSlot = 16;//slots[3];
|
||||
int[] slots = UtilUI.getIndicesFor(15, 1, 5, 1);
|
||||
/*int particleSlot = 9;//slots[0];
|
||||
int arrowSlot = 11;//slots[1];
|
||||
int jumpSlot = 13;//slots[2];
|
||||
int deathSlot = 15;//slots[3];
|
||||
int gadgetSlot = 27;//slots[4];
|
||||
int morphSlot = 29;//slots[5];
|
||||
int mountSlot = 31;//slots[6];
|
||||
@ -76,7 +83,12 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
int musicSlot = 47;//slots[10];
|
||||
int tauntSlot = 49;//slots[11];
|
||||
int winEffectSlot = 51;
|
||||
int gameModifierSlot = 53;
|
||||
int gameModifierSlot = 53;*/
|
||||
int particleSlot = slots[0], arrowSlot = slots[1], jumpSlot = slots[2],
|
||||
deathSlot = slots[3], gadgetSlot = slots[4], morphSlot = slots[5],
|
||||
mountSlot = slots[6], petSlot = slots[7], hatSlot = slots[8],
|
||||
costumeSlot = slots[9], musicSlot = slots[10], tauntSlot = slots[11],
|
||||
winEffectSlot = slots[12], gameModifierSlot = slots[13], balloonsSlot = slots[14];
|
||||
|
||||
EnumMap<GadgetType, Integer> ownedCount = new EnumMap<GadgetType, Integer>(GadgetType.class);
|
||||
EnumMap<GadgetType, Integer> maxCount = new EnumMap<GadgetType, Integer>(GadgetType.class);
|
||||
@ -133,74 +145,79 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
Creature petActive = getPlugin().getPetManager().getPet(getPlayer());
|
||||
|
||||
GadgetType type = GadgetType.PARTICLE;
|
||||
String[] lore = getLore(ownedCount.get(type), maxCount.get(type), "Show everyone how cool you are with swirly particles that follow you when you walk!", "Visible Everywhere", enabled.get(type));
|
||||
String[] lore = getLore(ownedCount.get(type), maxCount.get(type), "Show everyone how cool you are with swirly particles that follow you when you walk!", VISIBILITY_EVERYWHERE, enabled.get(type));
|
||||
addButton(particleSlot, new ShopItem(Material.NETHER_STAR, "Particle Effects", lore, 1, false), new OpenParticles(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(particleSlot);
|
||||
|
||||
type = GadgetType.ARROW_TRAIL;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your arrows will now leave particle trails as they soar through the air.", "Visible in Games", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your arrows will now leave particle trails as they soar through the air.", VISIBILITY_GAMES, enabled.get(type));
|
||||
addButton(arrowSlot, new ShopItem(Material.ARROW, "Arrow Effects", lore, 1, false), new OpenArrowTrails(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(arrowSlot);
|
||||
|
||||
type = GadgetType.DOUBLE_JUMP;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Demonstrate your parkour prowess with sweet particles when you double jump.", "Visible Everywhere", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Demonstrate your parkour prowess with sweet particles when you double jump.", VISIBILITY_EVERYWHERE, enabled.get(type));
|
||||
addButton(jumpSlot, new ShopItem(Material.GOLD_BOOTS, "Double Jump Effects", lore, 1, false), new OpenDoubleJump(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(jumpSlot);
|
||||
|
||||
type = GadgetType.DEATH;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your death will now be mourned with a wonderful particle tribute.", "Visible in Games", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your death will now be mourned with a wonderful particle tribute.", VISIBILITY_GAMES, enabled.get(type));
|
||||
addButton(deathSlot, new ShopItem(Material.SKULL_ITEM, "Death Animations", lore, 1, false), new OpenDeathAnimations(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(deathSlot);
|
||||
|
||||
type = GadgetType.ITEM;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "All sorts of zany contraptions to use on your friends and foes.", "Usable in Lobbies", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "All sorts of zany contraptions to use on your friends and foes.", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(gadgetSlot, new ShopItem(Material.MELON_BLOCK, "Gadgets", lore, 1, false), new OpenGadgets(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(gadgetSlot);
|
||||
|
||||
type = GadgetType.MORPH;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Have you ever wanted to be a tiger? Well, you can't be a tiger! That's silly! But you can be many other things!", "Usable in Lobbies", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Have you ever wanted to be a tiger? Well, you can't be a tiger! That's silly! But you can be many other things!", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(morphSlot, new ShopItem(Material.LEATHER, "Morphs", lore, 1, false), new OpenMorphs(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(morphSlot);
|
||||
|
||||
lore = getLore(mountOwned, mountMax, "Why walk when you can ride? Summon fancy mounts to help you move in style.", "Usable in Lobbies", mountActive == null ? null : mountActive.getName());
|
||||
lore = getLore(mountOwned, mountMax, "Why walk when you can ride? Summon fancy mounts to help you move in style.", VISIBILITY_HUB, mountActive == null ? null : mountActive.getName());
|
||||
addButton(mountSlot, new ShopItem(Material.IRON_BARDING, "Mounts", lore, 1, false), new OpenMounts(this, mountActive));
|
||||
if (mountActive != null) addGlow(mountSlot);
|
||||
|
||||
lore = getLore(petOwned, petMax, "Life on a server can get lonely sometimes. Summon an adorable pet to follow you around and cheer you up!", "Usable in Lobbies", petActive == null ? null : petActive.getCustomName());
|
||||
lore = getLore(petOwned, petMax, "Life on a server can get lonely sometimes. Summon an adorable pet to follow you around and cheer you up!", VISIBILITY_HUB, petActive == null ? null : petActive.getCustomName());
|
||||
addButton(petSlot, new ShopItem(Material.BONE, "Pets", lore, 1, false), new OpenPets(this));
|
||||
if (petActive != null) addGlow(petSlot);
|
||||
|
||||
type = GadgetType.HAT;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the ladies.", "Usable in Lobbies", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the ladies.", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(hatSlot, new ShopItem(Material.GOLD_HELMET, "Hats", lore, 1, false), new OpenHats(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(hatSlot);
|
||||
|
||||
type = GadgetType.COSTUME;
|
||||
// Fixes more than 8 costumes being counted, even without the WindUp
|
||||
lore = getLore((ownedCount.get(type) > 8) ? 8 : ownedCount.get(type), /*maxCount.get(type)*/ 8, "Sometimes going out calls for special clothes! Gain bonus effects for matching outfit.", "Usable in Lobbies", enabled.get(type));
|
||||
// -4 Fixes more than the real costumes being counted (Happens because of the hub games costumes
|
||||
lore = getLore(ownedCount.get(type) - 4, maxCount.get(type) - 4, "Sometimes going out calls for special clothes! Gain bonus effects for matching outfit.", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(costumeSlot, new ShopItem(Material.DIAMOND_CHESTPLATE, "Costumes", lore, 1, false), new OpenCostumes(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(costumeSlot);
|
||||
|
||||
type = GadgetType.MUSIC_DISC;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "I JUST WANT TO DANCE WITH YOU!", "Usable in Lobbies", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "I JUST WANT TO DANCE WITH YOU!", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(musicSlot, new ShopItem(Material.GREEN_RECORD, "Music", lore, 1, false), new OpenMusic(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(musicSlot);
|
||||
|
||||
type = GadgetType.TAUNT;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Taunt your enemies or just show off. Use /taunt to have a good time!", "Visible in Games", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Taunt your enemies or just show off. Use /taunt to have a good time!", VISIBILITY_GAMES, enabled.get(type));
|
||||
addButton(tauntSlot, new ShopItem(Material.NAME_TAG, "Taunts", lore, 1, false), new OpenTaunts(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(tauntSlot);
|
||||
|
||||
type = GadgetType.WIN_EFFECT;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Winning a game with your friends all good and dandy, but then being able to also show off awesome effects is even more fun!", "Usable in Lobbies", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Winning a game with your friends all good and dandy, but then being able to also show off awesome effects is even more fun!", VISIBILITY_GAMES, enabled.get(type));
|
||||
addButton(winEffectSlot, new ShopItem(Material.CAKE, "Win Effects", lore, 1, false), new OpenWinEffect(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(winEffectSlot);
|
||||
|
||||
|
||||
type = GadgetType.GAME_MODIFIER;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Cosmetic effects which changes appearances of objects in game", "Visible in Games", enabled.get(type));
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Cosmetic effects which changes appearances of objects in game", VISIBILITY_GAMES, enabled.get(type));
|
||||
addButton(gameModifierSlot, new ShopItem(Material.TORCH, "Game Modifiers", lore, 1, false), new OpenGameModifiers(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(gameModifierSlot);
|
||||
|
||||
type = GadgetType.BALLOON;
|
||||
lore = getLore(ownedCount.get(type), maxCount.get(type), "Coming Soon...", VISIBILITY_HUB, enabled.get(type));
|
||||
addButton(balloonsSlot, new ShopItem(Material.LEASH, "Balloons", lore, 1, false), new OpenBalloons(this, enabled.get(type)));
|
||||
if (enabled.containsKey(type)) addGlow(balloonsSlot);
|
||||
}
|
||||
|
||||
private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled)
|
||||
|
@ -57,6 +57,7 @@ import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.titan.ArrowTrailTitan;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant;
|
||||
import mineplex.core.gadget.gadgets.balloons.BalloonType;
|
||||
import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane;
|
||||
import mineplex.core.gadget.gadgets.death.christmas.DeathPresentDanger;
|
||||
import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart;
|
||||
@ -198,6 +199,7 @@ import mineplex.core.gadget.set.suits.SetFreezeSuit;
|
||||
import mineplex.core.gadget.set.suits.SetRaveSuit;
|
||||
import mineplex.core.gadget.set.suits.SetSpaceSuit;
|
||||
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||
import mineplex.core.gadget.types.BalloonGadget;
|
||||
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
@ -502,7 +504,7 @@ public class GadgetManager extends MiniPlugin
|
||||
// Game Modifiers
|
||||
|
||||
// MineStrike
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P250_Muertos, -2));
|
||||
/*addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P250_Muertos, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.CZ75_Auto_Tigris, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Desert_Eagle_Blaze, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Nova_Koi, -2));
|
||||
@ -513,6 +515,7 @@ public class GadgetManager extends MiniPlugin
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AWP_Asiimov, -2));
|
||||
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Knife_M9_Bayonette_Fade, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, ));
|
||||
|
||||
//Blue only
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P2000_Fire_Elemental, -2));
|
||||
@ -523,7 +526,11 @@ public class GadgetManager extends MiniPlugin
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Glock_18_Fade, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Galil_AR_Eco, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AK_47_Vulcan, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SG553_Pulse, -2));
|
||||
addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SG553_Pulse, -2));*/
|
||||
for (MineStrikeSkin mineStrikeSkin : MineStrikeSkin.values())
|
||||
{
|
||||
addGadget(new GameModifierMineStrikeSkin(this, mineStrikeSkin, -2));
|
||||
}
|
||||
|
||||
|
||||
// Survival Games
|
||||
@ -532,8 +539,12 @@ public class GadgetManager extends MiniPlugin
|
||||
addGadget(new KitGameModifier(this, kitModifier));
|
||||
}*/
|
||||
|
||||
// ONLY NEXT WEEK!
|
||||
// Balloons
|
||||
//addGadget(new BabyCowBalloon(this));
|
||||
/*for (BalloonType balloonType : BalloonType.values())
|
||||
{
|
||||
addGadget(new BalloonItem(this, balloonType));
|
||||
}*/
|
||||
|
||||
// TAUNTS!!!
|
||||
addGadget(new EternalTaunt(this));
|
||||
@ -709,6 +720,20 @@ public class GadgetManager extends MiniPlugin
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BalloonGadget getBalloonGadget(BalloonType balloonType)
|
||||
{
|
||||
for (Gadget gadget : getGadgets(GadgetType.BALLOON))
|
||||
{
|
||||
if (gadget instanceof BalloonGadget)
|
||||
{
|
||||
BalloonGadget balloonGadget = (BalloonGadget) gadget;
|
||||
if (balloonGadget.getBalloonType().equals(balloonType))
|
||||
return balloonGadget;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Disallows two armor gadgets in same slot.
|
||||
public void removeOutfit(Player player, ArmorSlot slot)
|
||||
@ -1322,4 +1347,5 @@ public class GadgetManager extends MiniPlugin
|
||||
|
||||
taunt.start(player);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>
|
||||
|
||||
public UnlockCosmeticsCommand(GadgetManager plugin)
|
||||
{
|
||||
super(plugin, Rank.JNR_DEV, "unlockCosmetics");
|
||||
super(plugin, Rank.SNR_MODERATOR, "unlockCosmetics");
|
||||
_plugin = plugin;
|
||||
}
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
package mineplex.core.gadget.gadgets.balloons;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.BalloonGadget;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
public class BabyCowBalloon extends BalloonGadget
|
||||
{
|
||||
|
||||
private ArmorStand _entityStand, _playerStand;
|
||||
private Entity _balloonEntity;
|
||||
|
||||
public BabyCowBalloon(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Baby Cow Balloon", new String[]{"placeholder"}, 0, Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.COW));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableCustom(Player player, boolean message)
|
||||
{
|
||||
if (!canSpawnBalloon(player))
|
||||
{
|
||||
// TODO MESSAGE
|
||||
return;
|
||||
}
|
||||
addPlayerBalloon(player);
|
||||
_entityStand = player.getWorld().spawn(player.getLocation(), ArmorStand.class);
|
||||
_entityStand.setGravity(false);
|
||||
_entityStand.setVisible(false);
|
||||
Cow babyCow = player.getWorld().spawn(player.getLocation(), Cow.class);
|
||||
babyCow.setBaby();
|
||||
_balloonEntity = babyCow;
|
||||
_entityStand.setPassenger(babyCow);
|
||||
Location balloonLocation = player.getLocation().add(_random.nextDouble(), getNewHeight(player), _random.nextDouble());
|
||||
_entityStand.teleport(balloonLocation);
|
||||
babyCow.setLeashHolder(player);
|
||||
// TODO UPDATE BALLOONS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
_entityStand.remove();
|
||||
_balloonEntity.remove();
|
||||
removePlayerBalloon(player);
|
||||
// TODO UPDATE PLAYER HEIGHT
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
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.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.BalloonGadget;
|
||||
|
||||
public class BalloonItem extends BalloonGadget
|
||||
{
|
||||
|
||||
private BalloonType _balloonType;
|
||||
private Map<UUID, List<Entity>> _entities = new HashMap<>();
|
||||
|
||||
public BalloonItem(GadgetManager manager, BalloonType balloonType)
|
||||
{
|
||||
super(manager, balloonType.getName(), balloonType.getLore(), balloonType.getCost(),
|
||||
balloonType.getDisplayItem().getType(),
|
||||
balloonType.getDisplayItem().getData().getData(), balloonType,
|
||||
balloonType.getEntityType());
|
||||
setDisplayItem(balloonType.getDisplayItem());
|
||||
_balloonType = balloonType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity[] spawnEntity(Player player)
|
||||
{
|
||||
Entity[] ents = new Entity[2];
|
||||
if (_balloonType.getEntityType().equals(EntityType.ARMOR_STAND))
|
||||
{
|
||||
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
||||
zombie.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false, false));
|
||||
zombie.getEquipment().setHelmet(_balloonType.getDisplayItem());
|
||||
UtilEnt.silence(zombie, true);
|
||||
UtilEnt.vegetate(zombie);
|
||||
addEntity(player, zombie);
|
||||
|
||||
ents[0] = zombie;
|
||||
|
||||
return ents;
|
||||
}
|
||||
else if (_balloonType.equals(BalloonType.BABY_ZOMBIE))
|
||||
{
|
||||
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
||||
zombie.setBaby(true);
|
||||
UtilEnt.vegetate(zombie);
|
||||
addEntity(player, zombie);
|
||||
ents[0] = zombie;
|
||||
return ents;
|
||||
}
|
||||
|
||||
|
||||
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
|
||||
if (_balloonType.isBaby() && entity instanceof Ageable)
|
||||
((Ageable) entity).setBaby();
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package mineplex.core.gadget.gadgets.balloons;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
|
||||
public enum BalloonType
|
||||
{
|
||||
|
||||
// BABY
|
||||
BABY_COW (EntityType.COW, true, "Baby Cow Balloon", 0, new ItemStack(Material.COOKED_BEEF)),
|
||||
BABY_PIG (EntityType.PIG, true, "Baby Pig Balloon", 0, new ItemStack(Material.GRILLED_PORK)),
|
||||
BABY_ZOMBIE (EntityType.ZOMBIE, true, "Baby Zombie Balloon", 0, new ItemStack(Material.ROTTEN_FLESH)),
|
||||
BABY_MUSHROOM(EntityType.MUSHROOM_COW, true, "Baby Mushroom Cow Balloon", 0, new ItemStack(Material.MUSHROOM_SOUP)),
|
||||
BABY_OCELOT (EntityType.OCELOT, true, "Baby Ocelot Balloon", 0, new ItemStack(Material.COOKED_FISH)),
|
||||
BABY_WOLF (EntityType.WOLF, true, "Baby Wolf Balloon", 0, new ItemStack(Material.BONE)),
|
||||
BABY_SHEEP (EntityType.SHEEP, true, "Baby Sheep Balloon", 0, new ItemStack(Material.WOOL)),
|
||||
BABY_VILLAGER(EntityType.VILLAGER, true, "Baby Villager Balloon", 0, new ItemStack(Material.EMERALD)),
|
||||
BABY_SLIME (EntityType.SLIME, true, "Baby Slime Balloon", 0, new ItemStack(Material.SLIME_BALL)),
|
||||
|
||||
// NOT BABY
|
||||
SQUID (EntityType.SQUID, "Squid Balloon", 0, new ItemStack(Material.INK_SACK)),
|
||||
BAT (EntityType.BAT, "Bat Balloon", 0, new ItemStack(Material.JACK_O_LANTERN)),
|
||||
SILVERFISH(EntityType.SILVERFISH, "Silverfish Balloon", 0, new ItemStack(Material.getMaterial(97))),
|
||||
GUARDIAN (EntityType.GUARDIAN, "Guardian Balloon", 0, new ItemStack(Material.PRISMARINE_SHARD)),
|
||||
|
||||
// BLOCK
|
||||
/*DRAGON_EGG (new ItemStack(Material.DRAGON_EGG), false, "Dragon Egg Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
|
||||
DIAMOND_BLOCK(new ItemStack(Material.DIAMOND_BLOCK), false, "Diamond Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
|
||||
IRON_BLOCK (new ItemStack(Material.IRON_BLOCK), false, "Iron Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),
|
||||
GOLD_BLOCK (new ItemStack(Material.GOLD_BLOCK), false, "Gold Block Balloon", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE), 0),*/
|
||||
EMERALD_BLOCK(new ItemStack(Material.EMERALD_BLOCK), false, "Emerald Block Balloon", 0);
|
||||
|
||||
private EntityType _entityType;
|
||||
private boolean _isBaby;
|
||||
private String _name;
|
||||
private String[] _lore;
|
||||
private int _cost;
|
||||
private ItemStack _displayItem;
|
||||
|
||||
BalloonType(EntityType entityType, String name, int cost, ItemStack displayItem)
|
||||
{
|
||||
this(entityType, false, name, cost, displayItem);
|
||||
}
|
||||
|
||||
BalloonType(EntityType entityType, boolean isBaby, String name, int cost, ItemStack displayItem)
|
||||
{
|
||||
_entityType = entityType;
|
||||
_isBaby = isBaby;
|
||||
_name = name;
|
||||
_cost = cost;
|
||||
_displayItem = displayItem;
|
||||
}
|
||||
|
||||
BalloonType(ItemStack block, boolean isBaby, String name, int cost)
|
||||
{
|
||||
this(EntityType.ARMOR_STAND, isBaby, name, cost, block);
|
||||
}
|
||||
|
||||
public EntityType getEntityType()
|
||||
{
|
||||
return _entityType;
|
||||
}
|
||||
|
||||
public boolean isBaby()
|
||||
{
|
||||
return _isBaby;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
public String[] getLore()
|
||||
{
|
||||
return UtilText.splitLinesToArray(new String[]{C.cGray + "A floating " + getName() + " that appears above your head!",
|
||||
"",
|
||||
C.cWhite + "Click to activate, click again to remove. You can have up to 10 balloons active at a time."}, LineFormat.LORE);
|
||||
}
|
||||
|
||||
public int getCost()
|
||||
{
|
||||
return _cost;
|
||||
}
|
||||
|
||||
public ItemStack getDisplayItem()
|
||||
{
|
||||
return _displayItem;
|
||||
}
|
||||
}
|
@ -51,7 +51,7 @@ public class GameModifierMineStrikeSkin extends GameModifierGadget
|
||||
*/
|
||||
public GameModifierMineStrikeSkin(GadgetManager manager, MineStrikeSkin skin, int cost)
|
||||
{
|
||||
this(manager, skin, new String[]{""}, cost);
|
||||
this(manager, skin, new String[]{skin.getWeaponName()}, cost);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,25 +5,33 @@ import org.bukkit.Material;
|
||||
public enum MineStrikeSkin
|
||||
{
|
||||
|
||||
P250_Muertos( "P250", "P250 Muertos", Material.INK_SACK, (byte) 3),
|
||||
CZ75_Auto_Tigris( "CZ75-Auto", "CZ75-Auto Tigris", Material.CLAY_BRICK, (byte) 0),
|
||||
Desert_Eagle_Blaze( "Desert Eagle", "Desert Eagle Blaze", Material.NETHER_STALK, (byte) 0),
|
||||
Nova_Koi( "Nova", "Nova Koi", Material.INK_SACK, (byte) 14),
|
||||
XM1014_Tranquility( "XM1014", "XM1014 Tranquility", Material.DIAMOND, (byte) 0),
|
||||
PP_Bizon_Streak( "PP-Bizon", "PP-Bizon Streak", Material.INK_SACK, (byte) 4),
|
||||
P90_Asiimov( "P90", "P90 Asiimov", Material.INK_SACK, (byte) 0),
|
||||
SSG_08_Blood_in_the_Water( "SSG 08", "SSG 08 Blood in the Water", Material.INK_SACK, (byte) 12),
|
||||
AWP_Asiimov( "AWP", "AWP Asiimov", Material.SULPHUR, (byte) 0),
|
||||
P2000_Fire_Elemental( "P2000", "P2000 Fire Elemental", Material.INK_SACK, (byte) 6),
|
||||
FAMAS_Pulse( "FAMAS", "FAMAS Pulse", Material.CLAY_BALL, (byte) 0),
|
||||
M4A4_Howl( "M4A4", "M4A4 Howl", Material.INK_SACK, (byte) 11),
|
||||
Steyr_AUG_Torque( "Steyr AUG", "Steyr AUG Torque", Material.BLAZE_ROD, (byte) 0),
|
||||
Glock_18_Fade( "Glock 18", "Glock 18 Fade", Material.INK_SACK, (byte) 9),
|
||||
Galil_AR_Eco( "Galil AR", "Galil AR Eco", Material.INK_SACK, (byte) 10),
|
||||
AK_47_Vulcan( "AK-47", "AK-47 Vulcan", Material.INK_SACK, (byte) 7),
|
||||
SG553_Pulse( "SG553", "SG553 Pulse", Material.INK_SACK, (byte) 5),
|
||||
P250_Muertos( "P250", "P250 Muertos", Material.INK_SACK, (byte) 3),
|
||||
CZ75_Auto_Tigris( "CZ75-Auto", "CZ75-Auto Tigris", Material.CLAY_BRICK, (byte) 0),
|
||||
Desert_Eagle_Blaze( "Desert Eagle", "Desert Eagle Blaze", Material.NETHER_STALK, (byte) 0),
|
||||
Desert_Eagle_Golden_Gun( "Desert Eagle", "Golden Gun", Material.GLOWSTONE_DUST, (byte) 0),
|
||||
Nova_Koi( "Nova", "Nova Koi", Material.INK_SACK, (byte) 14),
|
||||
XM1014_Tranquility( "XM1014", "XM1014 Tranquility", Material.DIAMOND, (byte) 0),
|
||||
XM1014_Pig_Gun( "XM1014", "XM1014 Pig Gun", Material.LEATHER, (byte) 0),
|
||||
PP_Bizon_Streak( "PP Bizon", "PP-Bizon Streak", Material.INK_SACK, (byte) 4),
|
||||
P90_Asiimov( "P90", "P90 Asiimov", Material.INK_SACK, (byte) 0),
|
||||
SSG_08_Blood_in_the_Water( "SSG 08", "SSG 08 Blood in the Water", Material.INK_SACK, (byte) 12),
|
||||
AWP_Asiimov( "AWP", "AWP Asiimov", Material.SULPHUR, (byte) 0),
|
||||
P2000_Fire_Elemental( "P2000", "P2000 Fire Elemental", Material.INK_SACK, (byte) 6),
|
||||
FAMAS_Pulse( "FAMAS", "FAMAS Pulse", Material.CLAY_BALL, (byte) 0),
|
||||
M4A4_Howl( "M4A4", "M4A4 Howl", Material.INK_SACK, (byte) 11),
|
||||
//M4A4_Enderman( "M4A4", "Enderman M4", )
|
||||
Steyr_AUG_Torque( "Steyr AUG", "Steyr AUG Torque", Material.BLAZE_ROD, (byte) 0),
|
||||
Glock_18_Fade( "Glock 18", "Glock 18 Fade", Material.INK_SACK, (byte) 9),
|
||||
Galil_AR_Eco( "Galil AR", "Galil AR Eco", Material.INK_SACK, (byte) 10),
|
||||
AK_47_Vulcan( "AK-47", "AK-47 Vulcan", Material.INK_SACK, (byte) 7),
|
||||
AK_47_Guardian( "AK-47", "Guardian AK", Material.PRISMARINE_SHARD, (byte) 0),
|
||||
SG553_Pulse( "SG553", "SG553 Pulse", Material.INK_SACK, (byte) 5),
|
||||
|
||||
|
||||
Knife_M9_Bayonette_Fade( "Knife", "M9 Bayonette Fade", Material.DIAMOND_SWORD, (byte) 0);
|
||||
Knife_M9_Bayonette_Fade( "Knife", "M9 Bayonette Fade", Material.DIAMOND_SWORD, (byte) 0),
|
||||
Knife_Counter_Terrorist_Sword("Knife", "Counter Terrorist Sword", Material.STICK, (byte) 0),
|
||||
Knife_Terrorist_Sword( "Knife", "Terrorist Sword", Material.FEATHER, (byte) 0),
|
||||
Knife_M9_Bayonette_Glass( "Knife", "Glass M9 Bayonette", Material.QUARTZ, (byte) 0);
|
||||
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class ItemFootball extends ItemGadget
|
||||
FallingBlock ball = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1, 0), Material.SKULL, (byte) 3);
|
||||
|
||||
Bat bat = player.getWorld().spawn(player.getLocation(), Bat.class);
|
||||
UtilEnt.Vegetate(bat);
|
||||
UtilEnt.vegetate(bat);
|
||||
UtilEnt.ghost(bat, true, true);
|
||||
UtilEnt.silence(bat, true);
|
||||
|
||||
|
@ -134,7 +134,7 @@ public class WinEffectHalloween extends WinEffectGadget
|
||||
skeleton.setCustomNameVisible(true);
|
||||
skeleton.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
|
||||
UtilEnt.ghost(skeleton, true, false);
|
||||
UtilEnt.Vegetate(skeleton);
|
||||
UtilEnt.vegetate(skeleton);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
playFirework(skeleton.getLocation().clone().add(0, 2, 0), i, true);
|
||||
|
@ -1,64 +1,138 @@
|
||||
package mineplex.core.gadget.types;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.balloons.BalloonType;
|
||||
import mineplex.core.gadget.util.BalloonData;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public abstract class BalloonGadget extends Gadget
|
||||
{
|
||||
|
||||
protected static final Map<UUID, List<BalloonGadget>> PLAYER_BALLOONS = new HashMap<>();
|
||||
private static final Map<UUID, Map<EntityType, BalloonData>> PLAYER_BALLOONS = new HashMap<>();
|
||||
|
||||
protected final Random _random;
|
||||
private EntityType _balloon;
|
||||
private BalloonType _balloonType;
|
||||
|
||||
public BalloonGadget(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data, String... altNames)
|
||||
public BalloonGadget(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data, BalloonType balloonType, EntityType balloon, String... altNames)
|
||||
{
|
||||
super(manager, GadgetType.BALLOON, name, desc, cost, material, data, 1, altNames);
|
||||
_random = new Random();
|
||||
_balloon = balloon;
|
||||
_balloonType = balloonType;
|
||||
}
|
||||
|
||||
protected boolean canSpawnBalloon(Player player)
|
||||
@Override
|
||||
public void enableCustom(Player player, boolean message)
|
||||
{
|
||||
boolean add = addPlayerBalloon(player);
|
||||
if (add)
|
||||
{
|
||||
_active.add(player);
|
||||
if (message)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Gadget", "You spawned a " + F.elem(getName()) + "!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Manager.removeActive(player, this);
|
||||
UtilPlayer.message(player, F.main("Gadget", "You cannot have more than " + F.count("10") + " balloons!"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
if (!_active.remove(player))
|
||||
return;
|
||||
|
||||
removePlayerBalloon(player);
|
||||
if (message)
|
||||
UtilPlayer.message(player, F.main("Gadget", "You despawned a " + F.elem(getName())) + "!");
|
||||
}
|
||||
|
||||
private boolean addPlayerBalloon(Player player)
|
||||
{
|
||||
if (!canSpawnBalloon(player))
|
||||
return false;
|
||||
|
||||
PLAYER_BALLOONS.computeIfAbsent(player.getUniqueId(), map -> new HashMap<>());
|
||||
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;
|
||||
}
|
||||
|
||||
private void removePlayerBalloon(Player player)
|
||||
{
|
||||
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
|
||||
{
|
||||
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
|
||||
if (PLAYER_BALLOONS.get(player.getUniqueId()).containsKey(_balloon))
|
||||
{
|
||||
removeEntities(player);
|
||||
PLAYER_BALLOONS.get(player.getUniqueId()).remove(_balloon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract Entity[] spawnEntity(Player player);
|
||||
|
||||
protected abstract void removeEntities(Player player);
|
||||
|
||||
@EventHandler
|
||||
public void onUpdate(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Map.Entry<UUID, Map<EntityType, BalloonData>> entry : PLAYER_BALLOONS.entrySet())
|
||||
{
|
||||
for (BalloonData balloonData : entry.getValue().values())
|
||||
{
|
||||
balloonData.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canSpawnBalloon(Player player)
|
||||
{
|
||||
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
|
||||
{
|
||||
Map<EntityType, BalloonData> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
|
||||
return balloonGadgets.size() < 10;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void addPlayerBalloon(Player player)
|
||||
public BalloonType getBalloonType()
|
||||
{
|
||||
if (canSpawnBalloon(player))
|
||||
{
|
||||
PLAYER_BALLOONS.computeIfAbsent(player.getUniqueId(), list -> new ArrayList<>());
|
||||
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
|
||||
balloonGadgets.add(this);
|
||||
PLAYER_BALLOONS.put(player.getUniqueId(), balloonGadgets);
|
||||
}
|
||||
return _balloonType;
|
||||
}
|
||||
|
||||
protected void removePlayerBalloon(Player player)
|
||||
public static int getBalloons(Player player)
|
||||
{
|
||||
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.computeIfPresent(player.getUniqueId(), (uuid, list) -> list);
|
||||
if (balloonGadgets.contains(this))
|
||||
{
|
||||
balloonGadgets.remove(this);
|
||||
}
|
||||
if (balloonGadgets.size() >= 1)
|
||||
PLAYER_BALLOONS.put(player.getUniqueId(), balloonGadgets);
|
||||
else
|
||||
PLAYER_BALLOONS.remove(player.getUniqueId());
|
||||
return ((PLAYER_BALLOONS.containsKey(player.getUniqueId())) ? PLAYER_BALLOONS.get(player.getUniqueId()).size() : 0);
|
||||
}
|
||||
|
||||
protected double getNewHeight(Player player)
|
||||
{
|
||||
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.computeIfPresent(player.getUniqueId(), (uuid, list) -> list);
|
||||
if (balloonGadgets != null)
|
||||
return balloonGadgets.size() * _random.nextDouble() * (_random.nextInt(1) + 2);
|
||||
return 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,133 @@
|
||||
package mineplex.core.gadget.util;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
|
||||
public class BalloonData
|
||||
{
|
||||
|
||||
/**
|
||||
* Makes the balloons fly around the player
|
||||
* Copied from {@link mineplex.core.gadget.gadgets.particle.ParticleFairyData}
|
||||
*/
|
||||
|
||||
private Player _player;
|
||||
private Entity _balloon, _passenger, _leash;
|
||||
private Location _balloonLoc, _target;
|
||||
private Vector _direction;
|
||||
private double _speed;
|
||||
private long _idleTime;
|
||||
|
||||
public BalloonData(Player player, Entity balloon)
|
||||
{
|
||||
_player = player;
|
||||
_balloon = balloon;
|
||||
_balloonLoc = player.getEyeLocation();
|
||||
_target = getNewTarget();
|
||||
_speed = 0.2;
|
||||
_idleTime = 0;
|
||||
_direction = new Vector(1, 0, 0);
|
||||
((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()
|
||||
{
|
||||
if (_leash == null)
|
||||
{
|
||||
if (!((LivingEntity) _balloon).isLeashed())
|
||||
((LivingEntity) _balloon).setLeashHolder(_player);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!((LivingEntity) _leash).isLeashed())
|
||||
((LivingEntity) _leash).setLeashHolder(_player);
|
||||
}
|
||||
|
||||
//Update Target
|
||||
if (UtilMath.offset(_player.getEyeLocation(), _target) > 3 || UtilMath.offset(_balloonLoc, _target) < 1)
|
||||
_target = getNewTarget();
|
||||
|
||||
//Pause?
|
||||
if (Math.random() > 0.98)
|
||||
_idleTime = System.currentTimeMillis() + (long)(Math.random() * 3000);
|
||||
|
||||
//Speed
|
||||
if (UtilMath.offset(_player.getEyeLocation(), _balloonLoc) < 3)
|
||||
{
|
||||
if (_idleTime > System.currentTimeMillis())
|
||||
{
|
||||
_speed = Math.max(0, _speed - 0.005);
|
||||
}
|
||||
else
|
||||
{
|
||||
_speed = Math.min(0.15, _speed + 0.005);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_idleTime = 0;
|
||||
|
||||
_speed = Math.min(0.15 + UtilMath.offset(_player.getEyeLocation(), _balloonLoc) * 0.05, _speed + 0.02);
|
||||
}
|
||||
|
||||
|
||||
//Modify Direction
|
||||
_direction.add(UtilAlg.getTrajectory(_balloonLoc, _target).multiply(0.15));
|
||||
if (_direction.length() < 1)
|
||||
_speed = _speed * _direction.length();
|
||||
UtilAlg.Normalize(_direction);
|
||||
|
||||
//Move
|
||||
if (UtilMath.offset(_balloonLoc, _target) > 0.1)
|
||||
_balloonLoc.add(_direction.clone().multiply(_speed));
|
||||
|
||||
_balloon.teleport(_balloonLoc);
|
||||
_balloon.setVelocity(new Vector(0, .25, 0));
|
||||
if (_passenger != null)
|
||||
{
|
||||
_passenger.teleport(_balloonLoc);
|
||||
_balloon.setPassenger(_passenger);
|
||||
}
|
||||
if (_leash != null)
|
||||
{
|
||||
_leash.teleport(_balloon.getLocation().add(0, 1.5, 0));
|
||||
}
|
||||
}
|
||||
|
||||
private Location getNewTarget()
|
||||
{
|
||||
return _player.getEyeLocation().add(Math.random() * 6 - 3, Math.random() * 7.5, Math.random() * 6 - 3);
|
||||
}
|
||||
|
||||
public Entity getBalloon()
|
||||
{
|
||||
return _balloon;
|
||||
}
|
||||
|
||||
public void setLeash(Entity leashedEntity)
|
||||
{
|
||||
_leash = leashedEntity;
|
||||
((LivingEntity) _leash).setLeashHolder(_player);
|
||||
}
|
||||
|
||||
}
|
@ -86,7 +86,7 @@ public class DisplaySlot
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilEnt.Vegetate(e, true);
|
||||
UtilEnt.vegetate(e, true);
|
||||
UtilEnt.ghost(e, true, false);
|
||||
}
|
||||
_pastedEntities.add(e);
|
||||
|
@ -44,7 +44,7 @@ public class DragonData extends MountData
|
||||
|
||||
//Spawn Dragon
|
||||
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
||||
UtilEnt.Vegetate(Dragon);
|
||||
UtilEnt.vegetate(Dragon);
|
||||
UtilEnt.ghost(Dragon, true, false);
|
||||
|
||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
@ -341,7 +341,7 @@ public class NpcManager extends MiniPlugin
|
||||
|
||||
if (npc.getDatabaseRecord().getRadius() == 0)
|
||||
{
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.vegetate(entity);
|
||||
UtilEnt.silence(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
@ -604,7 +604,7 @@ public class NpcManager extends MiniPlugin
|
||||
|
||||
if (npc.getDatabaseRecord().getRadius() == 0)
|
||||
{
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.vegetate(entity);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public class FlyingPetManager
|
||||
{
|
||||
|
||||
/**
|
||||
* Makes the Fkying pets fly around the player
|
||||
* Makes the Flying pets fly around the player
|
||||
* Copied from {@link mineplex.core.gadget.gadgets.particle.ParticleFairyData}
|
||||
*/
|
||||
|
||||
|
@ -8,7 +8,6 @@ import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.NBTTagCompound;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -19,7 +18,6 @@ import org.bukkit.SkullType;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPigZombie;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Blaze;
|
||||
@ -53,8 +51,8 @@ import mineplex.core.account.event.ClientWebResponseEvent;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.shape.ShapeWings;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
@ -70,7 +68,6 @@ import mineplex.core.disguise.disguises.DisguiseGuardian;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.disguise.disguises.DisguiseZombie;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.events.AddConditionEvent;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.pet.repository.PetRepository;
|
||||
@ -221,7 +218,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
witherDisguise.setInvulTime(530);
|
||||
|
||||
Creature silverfish = (Creature) _creatureModule.SpawnEntity(location, EntityType.SILVERFISH);
|
||||
UtilEnt.Vegetate(silverfish, true);
|
||||
UtilEnt.vegetate(silverfish, true);
|
||||
UtilEnt.silence(silverfish, true);
|
||||
silverfish.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
|
||||
pet.setPassenger(silverfish);
|
||||
@ -316,10 +313,6 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
}
|
||||
else if (pet instanceof Blaze)
|
||||
{
|
||||
|
||||
AddConditionEvent event = new AddConditionEvent("Pet", pet, pet, AddConditionEvent.CoreConditionType.SILENCE, 0, -1, true, Material.SNOW_BALL, (byte) 0, false, false);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
DisguiseZombie disguiseZombie = new DisguiseZombie(pet);
|
||||
disguiseZombie.setBaby(true);
|
||||
disguiseZombie.setHelmet(new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.WITHER.ordinal()));
|
||||
@ -335,6 +328,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
_disguiseManager.disguise(disguiseZombie);
|
||||
FlyingPetManager flyingPetManager = new FlyingPetManager(player, pet);
|
||||
_flyingPets.put(pet, flyingPetManager);
|
||||
UtilEnt.silence(pet, true);
|
||||
}
|
||||
else if (petType.equals(PetType.GINGERBREAD_MAN))
|
||||
{
|
||||
@ -345,18 +339,13 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
zombie.getEquipment().setLeggings(ItemStackFactory.Instance.createColoredLeatherArmor(2, Color.fromRGB(203, 122, 56)));
|
||||
zombie.getEquipment().setBoots(ItemStackFactory.Instance.createColoredLeatherArmor(3, Color.fromRGB(203, 122, 56)));
|
||||
|
||||
UtilEnt.silence(zombie, true);
|
||||
|
||||
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
|
||||
{
|
||||
zombie.setCustomName(Get(player).getPets().get(entityType));
|
||||
zombie.setCustomNameVisible(true);
|
||||
}
|
||||
|
||||
// Makes it silent
|
||||
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) zombie).getHandle();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
nmsEntity.c(tag);
|
||||
tag.setByte("Silent", (byte) 1);
|
||||
nmsEntity.f(tag);
|
||||
}
|
||||
|
||||
_activePetOwnerTypes.put(player.getName(), petType);
|
||||
@ -369,7 +358,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
((Ageable)pet).setAgeLock(true);
|
||||
}
|
||||
|
||||
UtilEnt.Vegetate(pet);
|
||||
UtilEnt.vegetate(pet);
|
||||
}
|
||||
|
||||
public Creature getPet(Player player)
|
||||
@ -635,4 +624,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
return _activePetOwners.values();
|
||||
}
|
||||
|
||||
public mineplex.core.creature.Creature getCreatureModule()
|
||||
{
|
||||
return _creatureModule;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -308,6 +308,20 @@ public class RewardManager
|
||||
addHat(Type.OMEGA, HatType.PRESENT, rarity, 5);
|
||||
addHat(Type.OMEGA, HatType.SNOWMAN, rarity, 5);
|
||||
|
||||
/*addBalloon(Type.OMEGA,BalloonType.BABY_COW, rarity, 10, 100);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_PIG, rarity, 10, 100);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_SHEEP, rarity, 15, 100);*/
|
||||
|
||||
// Minestrike Skins
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.P2000_Fire_Elemental, rarity, 100, 500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.M4A4_Howl, rarity, 100, 500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Steyr_AUG_Torque, rarity, 100, 500);
|
||||
|
||||
// Balloons
|
||||
/*addBalloon(Type.NORMAL, BalloonType.BABY_COW, rarity, 10, 100);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_PIG, rarity, 10, 100);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_SHEEP, rarity, 15, 100);*/
|
||||
|
||||
// INFUSED CHESTS
|
||||
addHat(Type.INFUSED_CHESTS, HatType.PRESENT, rarity, 40, 100);
|
||||
addHat(Type.INFUSED_CHESTS, HatType.SNOWMAN, rarity, 38, 100);
|
||||
@ -375,7 +389,7 @@ public class RewardManager
|
||||
addGadget(Type.NORMAL, getGadget(ParticlePartyTime.class), rarity, 12);
|
||||
|
||||
//Game Modifiers MineStrike
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 200);
|
||||
/*addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 200);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 200);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SSG_08_Blood_in_the_Water, rarity, 50);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Galil_AR_Eco, rarity, 20);
|
||||
@ -386,7 +400,17 @@ public class RewardManager
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.PP_Bizon_Streak, rarity, 40);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.CZ75_Auto_Tigris, rarity, 100);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Steyr_AUG_Torque, rarity, 30);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.XM1014_Tranquility, rarity, 30);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.XM1014_Tranquility, rarity, 30);*/
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.SSG_08_Blood_in_the_Water, rarity, 150, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Galil_AR_Eco, rarity, 150, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Nova_Koi, rarity, 100, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Knife_M9_Bayonette_Fade, rarity, 30, 2500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.PP_Bizon_Streak, rarity, 150, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.CZ75_Auto_Tigris, rarity, 100, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.XM1014_Tranquility, rarity, 100, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Desert_Eagle_Golden_Gun, rarity, 30, 2500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.P90_Asiimov, rarity, 100, 1000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.SG553_Pulse, rarity, 100, 1000);
|
||||
|
||||
|
||||
// VALENTINES
|
||||
@ -472,6 +496,23 @@ public class RewardManager
|
||||
|
||||
addGadget(Type.OMEGA, getGadget(ParticleCandyCane.class), rarity, 25);
|
||||
|
||||
/*addBalloon(Type.OMEGA, BalloonType.BABY_ZOMBIE, rarity, 25, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_MUSHROOM, rarity, 50, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_OCELOT, rarity, 50, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_WOLF, rarity, 75, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_VILLAGER, rarity, 25, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BABY_SLIME, rarity, 25, 500);
|
||||
addBalloon(Type.OMEGA, BalloonType.BAT, rarity, 50, 500);*/
|
||||
|
||||
// Balloons
|
||||
/*addBalloon(Type.NORMAL, BalloonType.BABY_ZOMBIE, rarity, 25, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_MUSHROOM, rarity, 50, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_OCELOT, rarity, 50, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_WOLF, rarity, 75, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_VILLAGER, rarity, 25, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BABY_SLIME, rarity, 25, 500);
|
||||
addBalloon(Type.NORMAL, BalloonType.BAT, rarity, 50, 500);*/
|
||||
|
||||
// HAUNTED CHEST
|
||||
addGadget(Type.HAUNTED, getGadget(DoubleJumpHalloween.class), rarity, 10);
|
||||
addHat(Type.HAUNTED, HatType.PUMPKIN, rarity, 10);
|
||||
@ -551,7 +592,7 @@ public class RewardManager
|
||||
addGadget(Type.NORMAL, getGadget(WinEffectRiseOfTheElderGuardian.class), rarity, 4);
|
||||
|
||||
//GameModifier MineStrike
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 8);
|
||||
/*addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 8);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 8);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Desert_Eagle_Blaze, rarity, 10);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Glock_18_Fade, rarity, 20);
|
||||
@ -560,7 +601,18 @@ public class RewardManager
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P250_Muertos, rarity, 20);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.FAMAS_Pulse, rarity, 33);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SG553_Pulse, rarity, 33);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AK_47_Vulcan, rarity, 5);
|
||||
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AK_47_Vulcan, rarity, 5);*/
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Desert_Eagle_Blaze, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Glock_18_Fade, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.P250_Muertos, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.AK_47_Vulcan, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Knife_Counter_Terrorist_Sword, rarity, 50, 6500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Knife_Terrorist_Sword, rarity, 50, 6500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.Knife_M9_Bayonette_Glass, rarity, 50, 6500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.AK_47_Guardian, rarity, 10, 7500);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.AWP_Asiimov, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.FAMAS_Pulse, rarity, 100, 5000);
|
||||
addMineStrikeSkin(Type.MINESTRIKE, MineStrikeSkin.XM1014_Pig_Gun, rarity, 10, 7500);
|
||||
|
||||
//WINTER
|
||||
|
||||
@ -650,6 +702,25 @@ public class RewardManager
|
||||
|
||||
addHat(Type.OMEGA, HatType.GRINCH, rarity, 25);
|
||||
|
||||
/*addBalloon(Type.OMEGA, BalloonType.SQUID, rarity, 10, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.SILVERFISH, rarity, 30, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.GUARDIAN, rarity, 30, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.DRAGON_EGG, rarity, 10, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.DIAMOND_BLOCK, rarity, 10, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.IRON_BLOCK, rarity, 20, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.GOLD_BLOCK, rarity, 30, 5000);
|
||||
addBalloon(Type.OMEGA, BalloonType.EMERALD_BLOCK, rarity, 15, 5000);*/
|
||||
|
||||
// Balloon
|
||||
/*addBalloon(Type.NORMAL, BalloonType.SQUID, rarity, 10, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.SILVERFISH, rarity, 30, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.GUARDIAN, rarity, 30, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.DRAGON_EGG, rarity, 10, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.DIAMOND_BLOCK, rarity, 10, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.IRON_BLOCK, rarity, 20, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.GOLD_BLOCK, rarity, 30, 5000);
|
||||
addBalloon(Type.NORMAL, BalloonType.EMERALD_BLOCK, rarity, 15, 5000);*/
|
||||
|
||||
// HAUNTED
|
||||
addPetReward(Type.HAUNTED, PetType.RABBIT, rarity, 100);
|
||||
addGadget(Type.HAUNTED, getGadget(MorphGrimReaper.class), rarity, 25);
|
||||
@ -782,6 +853,17 @@ public class RewardManager
|
||||
Gadget gadget = _gadgetManager.getHatGadget(hatType);
|
||||
return addGadget(type, gadget, gadget.getDisplayName(), rarity, weight, shards);
|
||||
}
|
||||
|
||||
/*public UnknownPackageReward addBalloon(Type type, BalloonType balloonType, RewardRarity rarity, int weight)
|
||||
{
|
||||
return addBalloon(type, balloonType, rarity, weight, getShards(rarity));
|
||||
}
|
||||
|
||||
public UnknownPackageReward addBalloon(Type type, BalloonType balloonType, RewardRarity rarity, int weight, int shards)
|
||||
{
|
||||
Gadget gadget = _gadgetManager.getBalloonGadget(balloonType);
|
||||
return addGadget(type, gadget, gadget.getDisplayName(), rarity, weight, shards);
|
||||
}*/
|
||||
|
||||
public InventoryReward addInventoryReward(RewardPool.Type type, ItemGadget gadget, RewardRarity rarity, int weight)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ public class RewardPool
|
||||
MYTHICAL(true),
|
||||
THANKFUL(false),
|
||||
GINGERBREAD(false, 1),
|
||||
MINESTRIKE(false, 1),
|
||||
MINESTRIKE(true, 2),
|
||||
CARL_SPINNER(true);
|
||||
|
||||
private boolean _useDuplicates;
|
||||
|
@ -2,6 +2,10 @@ package mineplex.core.reward.rewards;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.reward.RankRewardData;
|
||||
@ -10,10 +14,6 @@ import mineplex.core.reward.RewardData;
|
||||
import mineplex.core.reward.RewardRarity;
|
||||
import mineplex.core.reward.RewardType;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RankReward extends Reward
|
||||
{
|
||||
private Random _random;
|
||||
@ -35,9 +35,10 @@ public class RankReward extends Reward
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.ULTRA) rank = Rank.HERO;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.HERO) rank = Rank.LEGEND;
|
||||
else if ((rewardType == RewardType.MYTHICAL_CHEST || rewardType == RewardType.TRICK_OR_TREAT_CHEST || rewardType == RewardType.THANKFUL_CHEST) && _clientManager.Get(player).GetRank() == Rank.LEGEND) rank = Rank.TITAN;
|
||||
else if ((rewardType == RewardType.MYTHICAL_CHEST || rewardType == RewardType.TRICK_OR_TREAT_CHEST || rewardType == RewardType.THANKFUL_CHEST) && _clientManager.Get(player).GetRank() == Rank.TITAN) rank = Rank.ETERNAL;
|
||||
|
||||
if (rewardType == RewardType.MYTHICAL_CHEST && _random.nextDouble() < 0.01) // 1 Percent
|
||||
rank = Rank.TITAN;
|
||||
rank = Rank.ETERNAL;
|
||||
|
||||
if (rank == null)
|
||||
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
|
||||
@ -55,6 +56,7 @@ public class RankReward extends Reward
|
||||
if (_clientManager.Get(player).GetRank() == Rank.ALL) rank = Rank.ULTRA;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.ULTRA) rank = Rank.HERO;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.HERO) rank = Rank.LEGEND;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.LEGEND) rank = Rank.TITAN;
|
||||
|
||||
if (rank == null)
|
||||
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
|
||||
|
@ -356,8 +356,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
gingerbreadLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop");
|
||||
}
|
||||
|
||||
// Minestrike Chests not being released in this update!
|
||||
/*List<String> minestrikeLore = Lists.newArrayList();
|
||||
List<String> minestrikeLore = Lists.newArrayList();
|
||||
minestrikeLore.add(" ");
|
||||
minestrikeLore.add(F.value("Minestrike Chests Owned", "" + minestrikeCount));
|
||||
minestrikeLore.add(" ");
|
||||
@ -372,7 +371,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
minestrikeLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "20000 Treasure Shards");
|
||||
minestrikeLore.add(" ");
|
||||
minestrikeLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop");
|
||||
}*/
|
||||
}
|
||||
|
||||
ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false);
|
||||
|
||||
@ -382,7 +381,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
ShopItem legendary = new ShopItem(Material.ENDER_CHEST, C.cRed + C.Bold + "Mythical Treasure", legendaryLore.toArray(new String[0]), 0, false, false);
|
||||
ItemStack illuminated = new ShopItem(Material.SEA_LANTERN, C.cDAqua + C.Bold + "Illuminated Treasure", illuminatedLore.toArray(new String[0]), 0, false, false);
|
||||
ItemStack omega = SkinData.OMEGA_CHEST.getSkull(C.cAquaB + "Omega Treasure", omegaLore);
|
||||
//ItemStack minestrike = new ShopItem(Material.GLASS, C.cGoldB + "Minestrike Treasure", minestrikeLore.toArray(new String[0]), 0, false, false);
|
||||
ItemStack minestrike = new ShopItem(Material.GLASS, C.cGoldB + "Minestrike Treasure", minestrikeLore.toArray(new String[0]), 0, false, false);
|
||||
|
||||
// Seasonal chests
|
||||
ItemStack christmas = SkinData.PRESENT.getSkull(C.cDGreen + C.Bold + "Winter Holiday Treasure", christmasLore);
|
||||
@ -403,7 +402,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
TreasurePageItem mythicalTreasureItem = new TreasurePageItem(legendary, legendaryCount, TreasureType.MYTHICAL);
|
||||
TreasurePageItem illuminatedTreasureItem = new TreasurePageItem(illuminated, illuminatedCount, TreasureType.ILLUMINATED);
|
||||
TreasurePageItem omegaTreasureItem = new TreasurePageItem(omega, omegaCount, TreasureType.OMEGA);
|
||||
//TreasurePageItem minestrikeTreasureItem = new TreasurePageItem(minestrike, minestrikeCount, TreasureType.MINESTRIKE);
|
||||
TreasurePageItem minestrikeTreasureItem = new TreasurePageItem(minestrike, minestrikeCount, TreasureType.MINESTRIKE);
|
||||
|
||||
// Seasonal chests
|
||||
TreasurePageItem winterTreasureItem = new TreasurePageItem(christmas, christmasCount, TreasureType.CHRISTMAS);
|
||||
@ -418,7 +417,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
_normalTreasures.add(mythicalTreasureItem);
|
||||
_normalTreasures.add(illuminatedTreasureItem);
|
||||
_normalTreasures.add(omegaTreasureItem);
|
||||
//_normalTreasures.add(minestrikeTreasureItem);
|
||||
_normalTreasures.add(minestrikeTreasureItem);
|
||||
|
||||
_seasonalTreasures.add(winterTreasureItem);
|
||||
_seasonalTreasures.add(freedomTreasureItem);
|
||||
@ -440,9 +439,9 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
addChest(treasurePageItem, specialDisplayPositions[i]);
|
||||
i++;
|
||||
}
|
||||
i = 0;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
int[] normalDisplayPositions = getNormalDisplayOrder();
|
||||
for (TreasurePageItem treasurePageItem : _normalTreasures)
|
||||
{
|
||||
@ -508,8 +507,8 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
|
||||
private int[] getNormalDisplayOrder()
|
||||
{
|
||||
int seasonalTreasuresSize = _seasonalTreasures.size();
|
||||
switch (seasonalTreasuresSize)
|
||||
int normalTreasuresSize = _normalTreasures.size();
|
||||
switch (normalTreasuresSize)
|
||||
{
|
||||
case 5:
|
||||
return new int[]{20, 22, 24, 39, 41};
|
||||
|
@ -1,14 +1,9 @@
|
||||
package mineplex.game.clans.clans.siege.weapon;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Slime;
|
||||
@ -41,13 +36,11 @@ import mineplex.game.clans.clans.ClanInfo;
|
||||
import mineplex.game.clans.clans.ClansGame;
|
||||
import mineplex.game.clans.clans.ClansManager;
|
||||
import mineplex.game.clans.clans.siege.SiegeManager;
|
||||
import mineplex.game.clans.clans.siege.events.SiegeWeaponExplodeEvent;
|
||||
import mineplex.game.clans.clans.siege.repository.tokens.SiegeWeaponToken;
|
||||
import mineplex.game.clans.clans.siege.weapon.projectile.WeaponProjectile;
|
||||
import mineplex.game.clans.clans.siege.weapon.util.AccessRule;
|
||||
import mineplex.game.clans.clans.siege.weapon.util.AccessType;
|
||||
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
|
||||
import mineplex.game.clans.core.repository.ClanTerritory;
|
||||
|
||||
public class Cannon extends SiegeWeapon
|
||||
{
|
||||
@ -324,7 +317,7 @@ public class Cannon extends SiegeWeapon
|
||||
Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class);
|
||||
|
||||
UtilEnt.silence(filler, true);
|
||||
UtilEnt.Vegetate(filler);
|
||||
UtilEnt.vegetate(filler);
|
||||
|
||||
filler.setSize(-1);
|
||||
filler.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
|
||||
@ -334,7 +327,7 @@ public class Cannon extends SiegeWeapon
|
||||
Slime playerMount = _location.getWorld().spawn(_location.clone(), Slime.class);
|
||||
|
||||
UtilEnt.silence(playerMount, true);
|
||||
UtilEnt.Vegetate(playerMount);
|
||||
UtilEnt.vegetate(playerMount);
|
||||
|
||||
playerMount.setSize(-1);
|
||||
playerMount.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1, true, false));
|
||||
|
@ -195,7 +195,7 @@ public class CombatLogNPC
|
||||
skel.setMetadata("CombatLogNPC", new FixedMetadataValue(ClansManager.getInstance().getPlugin(), player.getUniqueId().toString()));
|
||||
skel.teleport(spawnLoc);
|
||||
skel.setHealth(_spawnHealth);
|
||||
UtilEnt.Vegetate(skel);
|
||||
UtilEnt.vegetate(skel);
|
||||
UtilEnt.silence(skel, true);
|
||||
|
||||
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
||||
|
@ -94,7 +94,7 @@ public class AttackEnemyObjective extends OrderedObjective<ClansMainTutorial>
|
||||
shooter.setCustomName(name);
|
||||
shooter.setCustomNameVisible(true);
|
||||
|
||||
UtilEnt.Vegetate(shooter);
|
||||
UtilEnt.vegetate(shooter);
|
||||
|
||||
shooter.teleport(location);
|
||||
shooter.setHealth(shooter.getMaxHealth());
|
||||
|
@ -113,7 +113,7 @@ public class HalloweenSpookinessManager extends MiniPlugin
|
||||
Skeleton skeleton = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
|
||||
UtilEnt.silence(skeleton, true);
|
||||
UtilEnt.Vegetate(skeleton);
|
||||
UtilEnt.vegetate(skeleton);
|
||||
UtilEnt.ghost(skeleton, true, false);
|
||||
|
||||
skeleton.getEquipment().setItemInHand(ItemStackFactory.Instance.CreateStack(0));
|
||||
|
@ -159,7 +159,7 @@ public class SoccerManager extends MiniPlugin
|
||||
_ball = mid.getWorld().spawn(mid, Slime.class);
|
||||
_ball.setSize(2);
|
||||
|
||||
UtilEnt.Vegetate(_ball);
|
||||
UtilEnt.vegetate(_ball);
|
||||
UtilEnt.ghost(_ball, true, false);
|
||||
|
||||
_ballVel = new Vector(0,-0.1,0);
|
||||
|
@ -97,7 +97,7 @@ public class BasketballGame implements Listener
|
||||
{
|
||||
_velocity = -7;
|
||||
Entity e = loc.getWorld().spawnEntity(loc, EntityType.SLIME);
|
||||
UtilEnt.Vegetate(e, true);
|
||||
UtilEnt.vegetate(e, true);
|
||||
UtilEnt.ghost(e, true, false);
|
||||
((Slime)e).setSize(1);
|
||||
|
||||
|
@ -3,7 +3,6 @@ package mineplex.minecraft.game.classcombat.Skill.Assassin;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Material;
|
||||
@ -17,7 +16,6 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -95,7 +93,7 @@ public class Illusion extends SkillActive
|
||||
|
||||
Skeleton skel = player.getWorld().spawn(player.getLocation(), Skeleton.class);
|
||||
skel.teleport(player.getLocation());
|
||||
UtilEnt.Vegetate(skel);
|
||||
UtilEnt.vegetate(skel);
|
||||
UtilEnt.silence(skel, true);
|
||||
|
||||
skel.setMaxHealth(14);
|
||||
|
@ -91,7 +91,7 @@ public class RopedArrow extends SkillActive
|
||||
|
||||
_arrows.add(event.getProjectile());
|
||||
|
||||
UtilEnt.Leash(player, event.getProjectile(), false, false);
|
||||
UtilEnt.leash(player, event.getProjectile(), false, false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -5,7 +5,6 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -20,8 +19,6 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
@ -61,7 +58,7 @@ public class SpiderCreature extends EventCreature<Spider>
|
||||
@Override
|
||||
protected void spawnCustom()
|
||||
{
|
||||
UtilEnt.Vegetate(getEntity());
|
||||
UtilEnt.vegetate(getEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,7 +49,7 @@ public class SpiderMinionCreature extends EventCreature<CaveSpider>
|
||||
@Override
|
||||
protected void spawnCustom()
|
||||
{
|
||||
UtilEnt.Vegetate(getEntity(), true);
|
||||
UtilEnt.vegetate(getEntity(), true);
|
||||
|
||||
getEntity().setVelocity(new Vector(UtilMath.rr(0.5, true), 0.4, UtilMath.rr(0.4, true)));
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class GolemCreature extends EventCreature<IronGolem>
|
||||
@ -124,7 +123,7 @@ public class GolemCreature extends EventCreature<IronGolem>
|
||||
@Override
|
||||
protected void spawnCustom()
|
||||
{
|
||||
UtilEnt.Vegetate(getEntity());
|
||||
UtilEnt.vegetate(getEntity());
|
||||
// EntityInsentient creature = (EntityInsentient) ((CraftEntity) getEntity()).getHandle();
|
||||
|
||||
// creature.Vegetated = false;
|
||||
|
@ -79,7 +79,7 @@ public class SkeletonCreature extends EventCreature<Skeleton>
|
||||
@Override
|
||||
protected void spawnCustom()
|
||||
{
|
||||
UtilEnt.Vegetate(getEntity());
|
||||
UtilEnt.vegetate(getEntity());
|
||||
getEntity().setSkeletonType(SkeletonType.WITHER);
|
||||
getEntity().getEquipment().setItemInHand(new ItemStack(Material.RECORD_6)); //Meridian Scepter
|
||||
getEntity().getEquipment().setItemInHandDropChance(0.f);
|
||||
|
@ -82,7 +82,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
|
||||
for (int i = 0; i < getBoss().Archers.size(); i++)
|
||||
{
|
||||
Skeleton archer = getBoss().Archers.get(i).getEntity();
|
||||
UtilEnt.Vegetate(archer);
|
||||
UtilEnt.vegetate(archer);
|
||||
((CraftSkeleton)archer).setVegetated(false);
|
||||
|
||||
double lead = i * ((2d * Math.PI)/getBoss().Archers.size());
|
||||
@ -98,7 +98,7 @@ public class SkeletonArcherShield extends BossAbility<SkeletonCreature, Skeleton
|
||||
if (initial)
|
||||
{
|
||||
archer.teleport(getEntity().getLocation().add(oX, oY, oZ));
|
||||
UtilEnt.Vegetate(archer);
|
||||
UtilEnt.vegetate(archer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2,9 +2,7 @@ package mineplex.minecraft.game.core.boss.snake;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Effect;
|
||||
@ -26,7 +24,6 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.boss.EventCreature;
|
||||
@ -58,7 +55,7 @@ public class SnakeCreature extends EventCreature<Silverfish>
|
||||
protected void spawnCustom()
|
||||
{
|
||||
getEntity().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 10000, 0));
|
||||
UtilEnt.Vegetate(getEntity());
|
||||
UtilEnt.vegetate(getEntity());
|
||||
UtilEnt.ghost(getEntity(), true, false);
|
||||
Vector dir = new Vector(UtilMath.rr(1, true), 0, UtilMath.rr(1, true)).normalize().multiply(_seperator);
|
||||
|
||||
|
@ -4,6 +4,8 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
@ -120,6 +122,7 @@ import mineplex.minecraft.game.core.condition.ConditionManager;
|
||||
import mineplex.minecraft.game.core.damage.DamageManager;
|
||||
import mineplex.minecraft.game.core.fire.Fire;
|
||||
import mineplex.serverdata.Region;
|
||||
|
||||
import nautilus.game.arcade.addons.SoupAddon;
|
||||
import nautilus.game.arcade.addons.TeamArmorAddon;
|
||||
import nautilus.game.arcade.booster.GameBoosterManager;
|
||||
@ -165,7 +168,6 @@ import nautilus.game.arcade.managers.lobby.current.NewGameLobbyManager;
|
||||
import nautilus.game.arcade.managers.lobby.legacy.LegacyGameLobbyManager;
|
||||
import nautilus.game.arcade.player.ArcadePlayer;
|
||||
import nautilus.game.arcade.shop.ArcadeShop;
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
|
||||
public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
@ -351,8 +353,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager);
|
||||
EternalGiveawayManager eternalGiveawayManager = new EternalGiveawayManager(getPlugin(), clientManager, serverStatusManager);
|
||||
|
||||
//new HolidayManager(this, titanGiveaway, eternalGiveawayManager);
|
||||
IsHolidayEnabled = false;
|
||||
if (IsHolidayEnabled)
|
||||
new HolidayManager(this, titanGiveaway, eternalGiveawayManager);
|
||||
|
||||
new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager);
|
||||
new GameTestingManager(this);
|
||||
|
@ -73,7 +73,7 @@ public class KitSheepPig extends ProgressingKit
|
||||
sheep.setColor(DyeColor.PINK);
|
||||
}
|
||||
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.vegetate(entity);
|
||||
|
||||
SpawnCustom(entity);
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class Basketball extends TeamGame
|
||||
this.CreatureAllowOverride = true;
|
||||
_velocity = -7;
|
||||
Entity e = Manager.GetCreature().SpawnEntity(loc, EntityType.SLIME);
|
||||
UtilEnt.Vegetate(e, true);
|
||||
UtilEnt.vegetate(e, true);
|
||||
UtilEnt.ghost(e, true, false);
|
||||
((Slime)e).setSize(1);
|
||||
this.CreatureAllowOverride = false;
|
||||
|
@ -8,8 +8,6 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
public class IronWizardDisplay extends BossDisplay
|
||||
{
|
||||
@ -27,7 +25,7 @@ public class IronWizardDisplay extends BossDisplay
|
||||
_golem = (IronGolem) getLocation().getWorld().spawnEntity(getLocation(),
|
||||
EntityType.IRON_GOLEM);
|
||||
_golem.teleport(getLocation());
|
||||
UtilEnt.Vegetate(_golem);
|
||||
UtilEnt.vegetate(_golem);
|
||||
|
||||
addEntity(_golem);
|
||||
}
|
||||
|
@ -7,10 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
public class SlimeKingDisplay extends BossDisplay
|
||||
{
|
||||
@ -31,7 +28,7 @@ public class SlimeKingDisplay extends BossDisplay
|
||||
|
||||
_slime.teleport(getLocation());
|
||||
|
||||
UtilEnt.Vegetate(_slime);
|
||||
UtilEnt.vegetate(_slime);
|
||||
|
||||
addEntity(_slime);
|
||||
}
|
||||
|
@ -7,11 +7,7 @@ import nautilus.game.arcade.game.games.bossbattles.BossBattles;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
public class SnakeDisplay extends BossDisplay
|
||||
{
|
||||
@ -30,7 +26,7 @@ public class SnakeDisplay extends BossDisplay
|
||||
|
||||
_sheep.teleport(getLocation());
|
||||
|
||||
UtilEnt.Vegetate(_sheep);
|
||||
UtilEnt.vegetate(_sheep);
|
||||
|
||||
addEntity(_sheep);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class SpiderDisplay extends BossDisplay
|
||||
Entity entity = getLocation().getWorld().spawnEntity(getLocation(),
|
||||
EntityType.SPIDER);
|
||||
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.vegetate(entity);
|
||||
this.addEntity(entity);
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class Ball
|
||||
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
||||
_ball.setSize(2);
|
||||
|
||||
UtilEnt.Vegetate(_ball);
|
||||
UtilEnt.vegetate(_ball);
|
||||
UtilEnt.ghost(_ball, false, false);
|
||||
_host.CreatureAllowOverride = false;
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class BuildData
|
||||
}
|
||||
|
||||
Entities.add(entity);
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
return true;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class Sleigh
|
||||
Target = loc.clone();
|
||||
|
||||
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
|
||||
UtilEnt.Vegetate(CentralEntity, true);
|
||||
UtilEnt.vegetate(CentralEntity, true);
|
||||
UtilEnt.ghost(CentralEntity, true, false);
|
||||
Host.Manager.GetCondition().Factory().Invisible("Sleigh", (LivingEntity) CentralEntity, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
|
@ -187,7 +187,7 @@ public class SleighHorse
|
||||
horseId = UtilEnt.getNewEntityId(false);
|
||||
_previousDir = getAngles(_lastFacing.getYaw());
|
||||
Ent = _lastFacing.getWorld().spawn(_lastFacing.subtract(0, 0.5, 0), Horse.class);
|
||||
UtilEnt.Vegetate(Ent);
|
||||
UtilEnt.vegetate(Ent);
|
||||
UtilEnt.ghost(Ent, true, false);
|
||||
Ent.setRemoveWhenFarAway(false);
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class SleighPart
|
||||
Ent.setAgeLock(true);
|
||||
Ent.setRemoveWhenFarAway(false);
|
||||
|
||||
UtilEnt.Vegetate(Ent, true);
|
||||
UtilEnt.vegetate(Ent, true);
|
||||
UtilEnt.ghost(Ent, true, false);
|
||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", Ent, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
@ -87,7 +87,7 @@ public class SleighPart
|
||||
return null;
|
||||
|
||||
Skeleton skel = Ent.getWorld().spawn(Ent.getLocation().add(0, 1, 0), Skeleton.class);
|
||||
UtilEnt.Vegetate(skel);
|
||||
UtilEnt.vegetate(skel);
|
||||
UtilEnt.ghost(skel, true, false);
|
||||
|
||||
ItemStack head = new ItemStack(Material.LEATHER_HELMET);
|
||||
@ -169,7 +169,7 @@ public class SleighPart
|
||||
newTop.setAgeLock(true);
|
||||
newTop.setRemoveWhenFarAway(false);
|
||||
|
||||
UtilEnt.Vegetate(newTop, true);
|
||||
UtilEnt.vegetate(newTop, true);
|
||||
UtilEnt.ghost(newTop, true, false);
|
||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", newTop, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.christmas.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
@ -9,11 +8,10 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -116,7 +114,7 @@ public class BossSnowmanPattern
|
||||
|
||||
Location loc = _spawnA.get(i);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(new BossSnowman(ent, loc, _aDir));
|
||||
}
|
||||
@ -129,7 +127,7 @@ public class BossSnowmanPattern
|
||||
|
||||
Location loc = _spawnB.get(i);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(new BossSnowman(ent, loc, _bDir));
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ import nautilus.game.arcade.game.games.christmas.parts.Part4;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
@ -30,7 +29,7 @@ public class CaveGiant
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
_ent = loc.getWorld().spawn(loc, Giant.class);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.vegetate(_ent);
|
||||
|
||||
_ent.setMaxHealth(300);
|
||||
_ent.setHealth(300);
|
||||
|
@ -47,7 +47,7 @@ public class PumpkinKing
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
_ent = UtilVariant.spawnWitherSkeleton(loc);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.vegetate(_ent);
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
_ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
|
@ -51,7 +51,7 @@ public class SnowmanBoss
|
||||
_heart = _spawn.getWorld().spawn(_spawn, IronGolem.class);
|
||||
_heart.setMaxHealth(1400);
|
||||
_heart.setHealth(1400);
|
||||
UtilEnt.Vegetate(_heart);
|
||||
UtilEnt.vegetate(_heart);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public class SnowmanMaze
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.put(ent, new SnowmanWaypoint(ent.getLocation()));
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class SnowmanMinion
|
||||
public SnowmanMinion(Snowman ent)
|
||||
{
|
||||
Ent = ent;
|
||||
UtilEnt.Vegetate(Ent);
|
||||
UtilEnt.vegetate(Ent);
|
||||
Ent.setMaxHealth(100);
|
||||
Ent.setHealth(Ent.getMaxHealth());
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class SnowmanWaveA
|
||||
Host.CreatureAllowOverride = true;
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(ent);
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import java.util.Iterator;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
@ -93,7 +92,7 @@ public class SnowmanWaveB
|
||||
Host.CreatureAllowOverride = true;
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(ent);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class DragonData
|
||||
//Spawn Dragon
|
||||
manager.GetGame().CreatureAllowOverride = true;
|
||||
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
||||
UtilEnt.Vegetate(Dragon);
|
||||
UtilEnt.vegetate(Dragon);
|
||||
manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
@ -155,7 +155,7 @@ public class Dragons extends SoloGame
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
CreatureAllowOverride = false;
|
||||
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
@ -156,7 +156,7 @@ public class DragonsTeams extends TeamGame
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
CreatureAllowOverride = false;
|
||||
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
@ -172,7 +172,7 @@ public class Gladiators extends SoloGame
|
||||
DisguisePlayer player = new DisguisePlayer(zombie, (zombie.equals(zombie1) ? tiger : random));
|
||||
Manager.GetDisguise().disguise(player);
|
||||
|
||||
UtilEnt.Vegetate(zombie);
|
||||
UtilEnt.vegetate(zombie);
|
||||
zombie.getEquipment().setHelmet(ArenaType.ORANGE.getLoadout().getHelmet());
|
||||
zombie.getEquipment().setChestplate(ArenaType.ORANGE.getLoadout().getChestplate());
|
||||
zombie.getEquipment().setLeggings(ArenaType.ORANGE.getLoadout().getLeggings());
|
||||
|
@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
@ -44,7 +43,6 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
@ -333,12 +331,12 @@ public class Gravity extends SoloGame
|
||||
this.CreatureAllowOverride = false;
|
||||
|
||||
slime.setSize(1);
|
||||
UtilEnt.Vegetate(slime, true);
|
||||
UtilEnt.vegetate(slime, true);
|
||||
UtilEnt.ghost(slime, true, false);
|
||||
|
||||
GravityHook hook = new GravityHook(this, slime, 4, velocity);
|
||||
|
||||
UtilEnt.Leash(hook.Base, player, false, false);
|
||||
UtilEnt.leash(hook.Base, player, false, false);
|
||||
|
||||
_hooks.put(player, hook);
|
||||
|
||||
|
@ -9,7 +9,6 @@ import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseBat;
|
||||
import nautilus.game.arcade.game.games.gravity.objects.*;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -58,7 +57,7 @@ public abstract class GravityObject
|
||||
Bat.setSitting(true);
|
||||
Host.Manager.GetDisguise().disguise(Bat);
|
||||
|
||||
UtilEnt.Vegetate(Base, true);
|
||||
UtilEnt.vegetate(Base, true);
|
||||
//UtilEnt.ghost(Base, true, true);
|
||||
Host.Manager.GetCondition().Factory().Invisible(null, Base, null, 9999, 1, false, false, false);
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import nautilus.game.arcade.game.games.halloween.Halloween;
|
||||
import nautilus.game.arcade.game.games.halloween.HalloweenAudio;
|
||||
import net.minecraft.server.v1_8_R3.EntityArrow;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.Navigation;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
@ -391,7 +390,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
_minions.add(skel);
|
||||
|
||||
UtilEnt.Vegetate(skel);
|
||||
UtilEnt.vegetate(skel);
|
||||
}
|
||||
|
||||
_minionSpawn = false;
|
||||
@ -646,7 +645,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
Blaze ent = GetEntity().getWorld().spawn(GetEntity().getLocation().add(0, 6, 0), Blaze.class);
|
||||
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
_shields.add(ent);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
//ent.setSize(1);
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
|
@ -245,7 +245,7 @@ public class Halloween2016 extends Halloween
|
||||
CreatureAllowOverride = true;
|
||||
ArmorStand bat = doorSchematicLocation.getWorld().spawn(doorSchematicLocation, ArmorStand.class);
|
||||
CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(bat, true);
|
||||
UtilEnt.vegetate(bat, true);
|
||||
UtilEnt.setAI(bat, false);
|
||||
UtilEnt.setTickWhenFarAway(bat, true);
|
||||
bat.setRemoveWhenFarAway(false);
|
||||
|
@ -57,7 +57,7 @@ public class MobGiant extends CryptBreaker<Giant>
|
||||
ent.setHealth(ent.getMaxHealth());
|
||||
|
||||
UtilEnt.setBoundingBox(_pathDummy, 0, 0);
|
||||
UtilEnt.Vegetate(_pathDummy, true);
|
||||
UtilEnt.vegetate(_pathDummy, true);
|
||||
UtilEnt.setStepHeight(_pathDummy, 1);
|
||||
|
||||
//Prevent other mobs from pushing the giant
|
||||
|
@ -110,7 +110,7 @@ public class MobPumpkinPrince extends CreatureBase<Skeleton> implements Listener
|
||||
((CraftZombie)_horse).getHandle().b(true);
|
||||
|
||||
_horse.setPassenger(ent);
|
||||
UtilEnt.Vegetate(_horse);
|
||||
UtilEnt.vegetate(_horse);
|
||||
|
||||
UtilServer.RegisterEvents(this);
|
||||
|
||||
|
@ -132,7 +132,7 @@ public class MobWitch extends CreatureBase<Zombie>
|
||||
for(int i = 0; i < BATS_BURST; i++)
|
||||
{
|
||||
Bat bat = GetEntity().getWorld().spawn(GetEntity().getEyeLocation(), Bat.class);
|
||||
UtilEnt.Vegetate(bat);
|
||||
UtilEnt.vegetate(bat);
|
||||
_bats.add(bat);
|
||||
addEntityPart(bat);
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public class WaveBoss extends WaveBase implements Listener
|
||||
_pumpkinKing.setCustomName(C.cYellow + C.Bold + "Pumpking King");
|
||||
_pumpkinKing.setCustomNameVisible(true);
|
||||
|
||||
UtilEnt.Vegetate(_pumpkinKing);
|
||||
UtilEnt.vegetate(_pumpkinKing);
|
||||
|
||||
_pumpkinKing.getWorld().strikeLightningEffect(_pumpkinKing.getLocation());
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class Spawner
|
||||
if (canSpawnMob(l))
|
||||
{
|
||||
Entity e = Host.getArcadeManager().GetCreature().SpawnEntity(l, _toSpawn);
|
||||
UtilEnt.Vegetate(e);
|
||||
UtilEnt.vegetate(e);
|
||||
spawned = true;
|
||||
_lastSpawned = System.currentTimeMillis();
|
||||
continue;
|
||||
|
@ -24,7 +24,7 @@ public class PathfinderData
|
||||
{
|
||||
Wither = wither;
|
||||
UtilEnt.ghost(wither, true, false);
|
||||
UtilEnt.Vegetate(wither, false);
|
||||
UtilEnt.vegetate(wither, false);
|
||||
|
||||
Location temp = wither.getLocation();
|
||||
temp.setPitch(UtilAlg.GetPitch(UtilAlg.getTrajectory(wither.getLocation(), target)));
|
||||
|
@ -125,7 +125,7 @@ public class WitherMinionManager implements Listener
|
||||
Skeleton e = UtilVariant.spawnWitherSkeleton(chosen);
|
||||
_entity = (Skeleton)e;
|
||||
UtilEnt.ghost(e, true, false);
|
||||
UtilEnt.Vegetate(e);
|
||||
UtilEnt.vegetate(e);
|
||||
e.setCustomName(C.cRed + "Wither Skeleton");
|
||||
((Skeleton)e).setMaxHealth(/*100*/65);
|
||||
((Skeleton)e).setHealth(/*100*/65);
|
||||
|
@ -35,7 +35,7 @@ public class ZombieWrapper
|
||||
|
||||
_wrapper = (Zombie) world.spawnEntity(center.clone().add(0.5, 1, 0.5), EntityType.ZOMBIE);
|
||||
|
||||
UtilEnt.Vegetate(_wrapper);
|
||||
UtilEnt.vegetate(_wrapper);
|
||||
UtilEnt.ghost(_wrapper, true, false);
|
||||
|
||||
_wrapper.setCustomName(C.cRedB + "Infected Zombie");
|
||||
|
@ -230,7 +230,7 @@ public class ChallengeRedLightGreenLight extends Challenge
|
||||
Location spawn = getCenter().add(VILLAGER_X, MAP_HEIGHT, 0);
|
||||
_villager = (Villager) getCenter().getWorld().spawnEntity(spawn, EntityType.VILLAGER);
|
||||
|
||||
UtilEnt.Vegetate(_villager);
|
||||
UtilEnt.vegetate(_villager);
|
||||
UtilEnt.CreatureLook(_villager, Host.GetSpectatorLocation());
|
||||
UtilEnt.ghost(_villager, true, false);
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class ChallengeVolleyPig extends TeamChallenge
|
||||
getCenter().add(PIG_CENTER_X, PIG_CENTER_Y, PIG_CENTER_Z).subtract(getArenaSize(), 0, 0),
|
||||
Pig.class);
|
||||
|
||||
UtilEnt.Vegetate(_pig);
|
||||
UtilEnt.vegetate(_pig);
|
||||
|
||||
Host.CreatureAllow = false;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.monsterleague;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
@ -17,7 +16,6 @@ import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.monsterleague.kits.LeagueKit;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.EntityEffect;
|
||||
@ -159,7 +157,7 @@ public class Ball
|
||||
_ball = _ballSpawn.getWorld().spawn(_ballSpawn, Slime.class);
|
||||
_ball.setSize(2);
|
||||
|
||||
UtilEnt.Vegetate(_ball);
|
||||
UtilEnt.vegetate(_ball);
|
||||
UtilEnt.ghost(_ball, false, false);
|
||||
_host.CreatureAllowOverride = false;
|
||||
|
||||
|
@ -530,7 +530,7 @@ public class Maze implements Listener
|
||||
|
||||
_host.CreatureAllowOverride = false;
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.vegetate(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
||||
|
||||
@ -568,7 +568,7 @@ public class Maze implements Listener
|
||||
|
||||
_host.CreatureAllowOverride = false;
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.vegetate(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class PlayerCopyPaintball
|
||||
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.vegetate(_ent);
|
||||
|
||||
_ent.setArms(true);
|
||||
_ent.setBasePlate(false);
|
||||
|
@ -57,7 +57,7 @@ public class SheepData
|
||||
StuckLocation = Sheep.getLocation();
|
||||
StuckTime = System.currentTimeMillis();
|
||||
|
||||
UtilEnt.Vegetate(Sheep);
|
||||
UtilEnt.vegetate(Sheep);
|
||||
UtilEnt.ghost(Sheep, true, false);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class PerkChickenRocket extends SmashPerk
|
||||
ent.getLocation().setYaw(player.getLocation().getYaw());
|
||||
ent.setBaby();
|
||||
ent.setAgeLock(true);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
_data.add(new ChickenMissileData(player, ent));
|
||||
|
@ -54,7 +54,7 @@ public class SmashEnderman extends SmashUltimate
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
EnderDragon dragon = player.getWorld().spawn(player.getLocation().add(0, 5, 0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(dragon);
|
||||
UtilEnt.vegetate(dragon);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
dragon.setCustomName(C.cYellow + player.getName() + "'s Dragon");
|
||||
|
@ -125,7 +125,7 @@ public class PerkPigBaconBomb extends SmashPerk
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
pig.setBaby();
|
||||
UtilEnt.Vegetate(pig);
|
||||
UtilEnt.vegetate(pig);
|
||||
UtilEnt.ghost(pig, true, false);
|
||||
|
||||
UUID key = player.getUniqueId();
|
||||
|
@ -69,7 +69,7 @@ public class SmashSnowman extends SmashUltimate
|
||||
Snowman ent = player.getWorld().spawn(player.getEyeLocation(), Snowman.class);
|
||||
game.CreatureAllowOverride = false;
|
||||
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
||||
ent.setMaxHealth(TURRET_HEALTH);
|
||||
|
@ -113,7 +113,7 @@ public class PerkWolf extends SmashPerk
|
||||
|
||||
wolf.setAngry(true);
|
||||
|
||||
UtilEnt.Vegetate(wolf);
|
||||
UtilEnt.vegetate(wolf);
|
||||
|
||||
wolf.setMaxHealth(WOLF_HEALTH);
|
||||
wolf.setHealth(wolf.getMaxHealth());
|
||||
|
@ -12,7 +12,6 @@ import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -23,13 +22,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.Navigation;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
@ -53,7 +48,6 @@ import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GamePrepareCountdownCommence;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.snake.events.SlimeUpgradeEvent;
|
||||
import nautilus.game.arcade.game.games.snake.events.TailGrowEvent;
|
||||
import nautilus.game.arcade.game.games.snake.kits.KitInvulnerable;
|
||||
@ -137,7 +131,7 @@ public class Snake extends SoloGame
|
||||
sheep.setColor(DyeColor.getByDyeData((byte) (i % 16)));
|
||||
sheep.setPassenger(player);
|
||||
|
||||
UtilEnt.Vegetate(sheep);
|
||||
UtilEnt.vegetate(sheep);
|
||||
|
||||
_tail.put(player, new ArrayList<Creature>());
|
||||
_tail.get(player).add(sheep);
|
||||
@ -384,7 +378,7 @@ public class Snake extends SoloGame
|
||||
Slime pig = loc.getWorld().spawn(loc, Slime.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
pig.setSize(2);
|
||||
UtilEnt.Vegetate(pig);
|
||||
UtilEnt.vegetate(pig);
|
||||
|
||||
_food.add(pig);
|
||||
}
|
||||
@ -454,7 +448,7 @@ public class Snake extends SoloGame
|
||||
//Sets yaw/pitch
|
||||
tail.teleport(loc);
|
||||
|
||||
UtilEnt.Vegetate(tail);
|
||||
UtilEnt.vegetate(tail);
|
||||
UtilEnt.ghost(tail, true, false);
|
||||
|
||||
_tail.get(player).add(tail);
|
||||
|
@ -52,7 +52,7 @@ public class NpcManager implements Listener
|
||||
LivingEntity npc = (LivingEntity) spawn.getWorld().spawn(spawn, getDisguiseType().getEntityClass());
|
||||
npc.setCanPickupItems(false);
|
||||
npc.setRemoveWhenFarAway(false);
|
||||
UtilEnt.Vegetate(npc);
|
||||
UtilEnt.vegetate(npc);
|
||||
getGame().CreatureAllowOverride = false;
|
||||
|
||||
return npc;
|
||||
|
@ -9,11 +9,9 @@ import mineplex.core.updater.event.*;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.*;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.inventory.*;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.*;
|
||||
|
||||
/**
|
||||
* Created by Tim on 8/5/2014.
|
||||
@ -106,7 +104,7 @@ public class PowerUpItem
|
||||
_powerUpManager.getGame().CreatureAllowOverride = true;
|
||||
_npc = itemLocation.getWorld().spawn(itemLocation, Skeleton.class);
|
||||
_powerUpManager.getGame().CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(_npc);
|
||||
UtilEnt.vegetate(_npc);
|
||||
UtilEnt.ghost(_npc, true, false);
|
||||
|
||||
_npc.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
||||
|
@ -341,7 +341,7 @@ public class SpeedBuilders extends SoloGame
|
||||
|
||||
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
||||
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
_middleMobs.add(entity);
|
||||
@ -1610,7 +1610,7 @@ public class SpeedBuilders extends SoloGame
|
||||
|
||||
Entity entity = block.getWorld().spawnEntity(block.getLocation().add(0.5, 0, 0.5), type);
|
||||
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
|
@ -191,7 +191,7 @@ public class RecreationData
|
||||
|
||||
Entity entity = loc.getWorld().spawnEntity(loc, mobData.EntityType);
|
||||
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
Mobs.add(entity);
|
||||
|
@ -314,7 +314,7 @@ public class Minion
|
||||
|
||||
private void path()
|
||||
{
|
||||
UtilEnt.Vegetate(_entity);
|
||||
UtilEnt.vegetate(_entity);
|
||||
UtilEnt.silence(_entity, true);
|
||||
UtilEnt.ghost(_entity, true, false);
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ public class TypeWars extends TeamGame
|
||||
_giantLocs.put(giant, loc.clone());
|
||||
this.CreatureAllowOverride = false;
|
||||
giant.setRemoveWhenFarAway(false);
|
||||
UtilEnt.Vegetate(giant, true);
|
||||
UtilEnt.vegetate(giant, true);
|
||||
UtilEnt.ghost(giant, true, false);
|
||||
|
||||
ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);
|
||||
|
@ -18,7 +18,6 @@ import mineplex.core.common.util.UtilTextBottom;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.noteblock.INoteVerifier;
|
||||
import mineplex.core.noteblock.NBSReader;
|
||||
import mineplex.core.noteblock.NotePlayer;
|
||||
import mineplex.core.noteblock.NoteSong;
|
||||
@ -167,7 +166,7 @@ public class Valentines extends SoloGame
|
||||
_cow.setCustomName(C.cGreen + C.Bold + _cowName);
|
||||
_cow.setCustomNameVisible(true);
|
||||
|
||||
UtilEnt.Vegetate(_cow);
|
||||
UtilEnt.vegetate(_cow);
|
||||
UtilEnt.ghost(_cow, true, false);
|
||||
CreatureAllowOverride = false;
|
||||
}
|
||||
@ -410,7 +409,7 @@ public class Valentines extends SoloGame
|
||||
Pig pig = loc.getWorld().spawn(loc, Pig.class);
|
||||
_pigs.put(pig, pig.getLocation());
|
||||
|
||||
UtilEnt.Vegetate(pig);
|
||||
UtilEnt.vegetate(pig);
|
||||
|
||||
//Give Item
|
||||
if (toSpawn > 1)
|
||||
|
@ -20,7 +20,6 @@ import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.valentines.ValItem;
|
||||
import nautilus.game.arcade.game.games.valentines.Valentines;
|
||||
import nautilus.game.arcade.gametutorial.GameTutorial;
|
||||
import nautilus.game.arcade.gametutorial.TutorialPhase;
|
||||
@ -110,7 +109,7 @@ public class TutorialValentines extends GameTutorial
|
||||
|
||||
//Spawn
|
||||
Pig pig = _pigSpawn.getWorld().spawn(_pigSpawn, Pig.class);
|
||||
UtilEnt.Vegetate(pig);
|
||||
UtilEnt.vegetate(pig);
|
||||
|
||||
|
||||
//Item
|
||||
@ -183,12 +182,12 @@ public class TutorialValentines extends GameTutorial
|
||||
_cowBoy = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("BROWN").get(0), Cow.class);
|
||||
_cowBoy.setCustomName(C.cGreenB + "Calvin");
|
||||
_cowBoy.setCustomNameVisible(true);
|
||||
UtilEnt.Vegetate(_cowBoy);
|
||||
UtilEnt.vegetate(_cowBoy);
|
||||
|
||||
_cowGirl = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("RED").get(0), MushroomCow.class);
|
||||
_cowGirl.setCustomName(C.cRedB + "Moolanie");
|
||||
_cowGirl.setCustomNameVisible(true);
|
||||
UtilEnt.Vegetate(_cowGirl);
|
||||
UtilEnt.vegetate(_cowGirl);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class PlayerCopyWither
|
||||
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.vegetate(_ent);
|
||||
|
||||
//Armor
|
||||
_ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents());
|
||||
|
@ -1,7 +1,6 @@
|
||||
package nautilus.game.arcade.game.modules.combatlog;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
||||
import net.minecraft.server.v1_8_R3.EntitySkeleton;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -15,14 +14,11 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
public class CombatLogNPC
|
||||
@ -147,7 +143,7 @@ public class CombatLogNPC
|
||||
skel.setFallDistance(player.getFallDistance());
|
||||
// fixme potion effects, mobs don't target, entity collision (setting to ghost disables arrows and fishing rods), logging while sleeping
|
||||
// best solution to spawn EntityPlayer?
|
||||
UtilEnt.Vegetate(skel);
|
||||
UtilEnt.vegetate(skel);
|
||||
UtilEnt.silence(skel, true);
|
||||
|
||||
skel.getEquipment().setHelmet(player.getInventory().getHelmet());
|
||||
|
@ -166,7 +166,7 @@ public abstract class Kit implements Listener
|
||||
skel.setSkeletonType(SkeletonType.WITHER);
|
||||
}
|
||||
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
UtilEnt.setFakeHead(entity, true);
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class PerkHorsePet extends Perk
|
||||
horse.setMaxHealth(40);
|
||||
horse.setHealth(40);
|
||||
|
||||
UtilEnt.Vegetate(horse);
|
||||
UtilEnt.vegetate(horse);
|
||||
|
||||
_horseMap.put(player, horse);
|
||||
|
||||
|
@ -398,7 +398,7 @@ public class NewGameLobbyManager extends LobbyManager
|
||||
|
||||
ent.setColor(DyeColor.getByWoolData(team.GetColorData()));
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.vegetate(ent, true);
|
||||
UtilEnt.setFakeHead(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class LegacyGameLobbyManager extends LobbyManager
|
||||
|
||||
ent.setColor(DyeColor.getByWoolData(teams.get(i).GetColorData()));
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.vegetate(ent, true);
|
||||
UtilEnt.setFakeHead(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user