Merge branch 'master' into feature/private-servers
This commit is contained in:
commit
12973aba7d
@ -12,10 +12,11 @@ public enum Rank
|
||||
DEVELOPER("Dev", ChatColor.RED),
|
||||
ADMIN("Admin", ChatColor.RED),
|
||||
SNR_MODERATOR("Sr.Mod", ChatColor.GOLD),
|
||||
MODERATOR("Mod", ChatColor.DARK_GREEN),
|
||||
HELPER("Helper", ChatColor.GREEN),
|
||||
MODERATOR("Mod", ChatColor.GOLD),
|
||||
HELPER("Helper", ChatColor.DARK_AQUA),
|
||||
MAPDEV("Mapper", ChatColor.BLUE),
|
||||
YOUTUBE("YouTube", ChatColor.RED),
|
||||
LEGEND("Legend", ChatColor.GREEN),
|
||||
HERO("Hero", ChatColor.LIGHT_PURPLE),
|
||||
ULTRA("Ultra", ChatColor.AQUA),
|
||||
ALL("", ChatColor.WHITE);
|
||||
|
@ -60,8 +60,13 @@ public class UtilFirework
|
||||
firework.remove();
|
||||
}
|
||||
|
||||
public static Firework launchFirework(Location loc, Type type, Color color, boolean flicker, boolean trail, Vector dir, int power)
|
||||
{
|
||||
return launchFirework(loc, FireworkEffect.builder().flicker(flicker).withColor(color).with(type).trail(trail).build(), dir, power);
|
||||
}
|
||||
|
||||
public static void playFirework(Location loc, Type type, Color color, boolean flicker, boolean trail)
|
||||
{
|
||||
playFirework(loc, FireworkEffect.builder().flicker(false).withColor(color).with(type).trail(false).build());
|
||||
playFirework(loc, FireworkEffect.builder().flicker(flicker).withColor(color).with(type).trail(trail).build());
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
@ -126,7 +127,7 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
itemLore.add(C.cWhite + "You must have an active pet to use this!");
|
||||
getInventory().setItem(slot, new ShopItem(petExtra.GetMaterial(), (byte)0, C.cRed + petExtra.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle());
|
||||
}
|
||||
else
|
||||
else if (Plugin.getPetManager().getActivePet(Player.getName()).getType() != EntityType.WITHER)
|
||||
{
|
||||
AddButton(slot, new ShopItem(petExtra.GetMaterial(), (byte)0, "Rename " + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName() + " for " + C.cYellow + petExtra.GetCost(CurrencyType.Coins) + C.cGreen + " Coins", itemLore.toArray(new String[itemLore.size()]), 1, false, false), new RenamePetButton(this));
|
||||
}
|
||||
|
@ -18,14 +18,16 @@ public abstract class DisguiseInsentient extends DisguiseLiving
|
||||
|
||||
DataWatcher.a(11, Byte.valueOf((byte)0));
|
||||
DataWatcher.a(10, "");
|
||||
DataWatcher.a(3, Byte.valueOf((byte) 0));
|
||||
DataWatcher.a(2, "");
|
||||
}
|
||||
|
||||
public void SetName(String name)
|
||||
public void setName(String name)
|
||||
{
|
||||
SetName(name, null);
|
||||
setName(name, null);
|
||||
}
|
||||
|
||||
public void SetName(String name, Rank rank)
|
||||
public void setName(String name, Rank rank)
|
||||
{
|
||||
if (rank != null)
|
||||
{
|
||||
@ -36,20 +38,22 @@ public abstract class DisguiseInsentient extends DisguiseLiving
|
||||
}
|
||||
|
||||
DataWatcher.watch(10, name);
|
||||
DataWatcher.watch(2, name);
|
||||
}
|
||||
|
||||
|
||||
public boolean HasCustomName()
|
||||
public boolean hasCustomName()
|
||||
{
|
||||
return DataWatcher.getString(10).length() > 0;
|
||||
}
|
||||
|
||||
public void SetCustomNameVisible(boolean visible)
|
||||
public void setCustomNameVisible(boolean visible)
|
||||
{
|
||||
DataWatcher.watch(11, Byte.valueOf((byte)(visible ? 1 : 0)));
|
||||
DataWatcher.watch(3, Byte.valueOf((byte)(visible ? 1 : 0)));
|
||||
}
|
||||
|
||||
public boolean GetCustomNameVisible()
|
||||
public boolean getCustomNameVisible()
|
||||
{
|
||||
return DataWatcher.getByte(11) == 1;
|
||||
}
|
||||
|
@ -40,4 +40,14 @@ public abstract class DisguiseLiving extends DisguiseBase
|
||||
{
|
||||
return (_random.nextFloat() - _random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
|
||||
public void setHealth(float health)
|
||||
{
|
||||
DataWatcher.watch(6, Float.valueOf(health));
|
||||
}
|
||||
|
||||
public float getHealth()
|
||||
{
|
||||
return DataWatcher.getFloat(6);
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ public class GadgetManager extends MiniPlugin
|
||||
addGadget(new MorphCreeper(this));
|
||||
addGadget(new MorphBlaze(this));
|
||||
//addGadget(new MorphGeno(this));
|
||||
addGadget(new MorphWither(this));
|
||||
|
||||
// Particles
|
||||
addGadget(new ParticleFoot(this));
|
||||
@ -128,6 +129,8 @@ public class GadgetManager extends MiniPlugin
|
||||
addGadget(new ParticleGreen(this));
|
||||
addGadget(new ParticleHeart(this));
|
||||
addGadget(new ParticleFairy(this));
|
||||
addGadget(new ParticleLegend(this));
|
||||
addGadget(new ParticleBlizzard(this));
|
||||
|
||||
// Music
|
||||
addGadget(new MusicGadget(this, "13 Disc", new String[] {""}, -2, 2256, 178000));
|
||||
|
@ -59,8 +59,8 @@ public class MorphBat extends MorphGadget implements IThrown
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseBat disguise = new DisguiseBat(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,8 @@ public class MorphBlaze extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ public class MorphChicken extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ public class MorphCow extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseCow disguise = new DisguiseCow(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ public class MorphCreeper extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseCreeper disguise = new DisguiseCreeper(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,8 @@ public class MorphEnderman extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseEnderman disguise = new DisguiseEnderman(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ public class MorphPig extends MorphGadget
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,8 @@ public class MorphPumpkinKing extends MorphGadget
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.showArmor();
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
|
||||
|
@ -58,8 +58,8 @@ public class MorphVillager extends MorphGadget implements IThrown
|
||||
this.ApplyArmor(player);
|
||||
|
||||
DisguiseVillager disguise = new DisguiseVillager(player);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,208 @@
|
||||
package mineplex.core.gadget.gadgets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.WitherSkull;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
|
||||
public class MorphWither extends MorphGadget
|
||||
{
|
||||
private ArrayList<WitherSkull> _skulls = new ArrayList<WitherSkull>();
|
||||
|
||||
public MorphWither(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Wither Morph", new String[]
|
||||
{
|
||||
C.cWhite + "Become a legendary Wither!",
|
||||
" ",
|
||||
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Wither Skull",
|
||||
" ",
|
||||
C.cPurple + "Unlocked with Legend Rank",
|
||||
},
|
||||
-1,
|
||||
Material.SKULL_ITEM, (byte)1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EnableCustom(final Player player)
|
||||
{
|
||||
this.ApplyArmor(player);
|
||||
|
||||
player.setMaxHealth(300);
|
||||
player.setHealth(300);
|
||||
|
||||
DisguiseWither disguise = new DisguiseWither(player);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
|
||||
player.setMaxHealth(20);
|
||||
player.setHealth(20);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void DisableCustom(Player player)
|
||||
{
|
||||
this.RemoveArmor(player);
|
||||
Manager.getDisguiseManager().undisguise(player);
|
||||
|
||||
player.setAllowFlight(false);
|
||||
player.setFlying(false);
|
||||
|
||||
player.setMaxHealth(20);
|
||||
player.setHealth(20);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void witherSkull(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!IsActive(player))
|
||||
return;
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.L))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), 1600, false, false))
|
||||
return;
|
||||
|
||||
Vector offset = player.getLocation().getDirection();
|
||||
if (offset.getY() < 0)
|
||||
offset.setY(0);
|
||||
|
||||
_skulls.add(player.launchProjectile(WitherSkull.class));
|
||||
|
||||
//Effect
|
||||
player.getWorld().playSound(player.getLocation(), Sound.WITHER_SHOOT, 0.5f, 1f);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void explode(EntityExplodeEvent event)
|
||||
{
|
||||
if (!_skulls.contains(event.getEntity()))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
WitherSkull skull = (WitherSkull)event.getEntity();
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, skull.getLocation(), 0, 0, 0, 0, 1);
|
||||
skull.getWorld().playSound(skull.getLocation(), Sound.EXPLODE, 2f, 1f);
|
||||
|
||||
HashMap<Player, Double> players = UtilPlayer.getInRadius(event.getLocation(), 6);
|
||||
for (Player player : players.keySet())
|
||||
{
|
||||
if (Manager.collideEvent(this, player))
|
||||
continue;
|
||||
|
||||
double mult = players.get(player);
|
||||
|
||||
//Knockback
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory(event.getLocation(), player.getLocation()), 2 * mult, false, 0, 0.6 + 0.4 * mult, 2, true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void clean(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
Iterator<WitherSkull> skullIterator = _skulls.iterator();
|
||||
|
||||
while (skullIterator.hasNext())
|
||||
{
|
||||
WitherSkull skull = skullIterator.next();
|
||||
|
||||
if (!skull.isValid())
|
||||
{
|
||||
skullIterator.remove();
|
||||
skull.remove();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void flight(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player player : GetActive())
|
||||
{
|
||||
if (player.getGameMode() == GameMode.CREATIVE)
|
||||
continue;
|
||||
|
||||
player.setAllowFlight(true);
|
||||
player.setFlying(true);
|
||||
|
||||
if (UtilEnt.isGrounded(player))
|
||||
player.setVelocity(new Vector(0,1,0));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void legendOwner(PlayerJoinEvent event)
|
||||
{
|
||||
if (Manager.getClientManager().Get(event.getPlayer()).GetRank() == Rank.LEGEND ||
|
||||
Manager.getClientManager().Get(event.getPlayer()).GetRank() == Rank.ADMIN ||
|
||||
Manager.getClientManager().Get(event.getPlayer()).GetRank() == Rank.DEVELOPER ||
|
||||
Manager.getClientManager().Get(event.getPlayer()).GetRank() == Rank.OWNER)
|
||||
{
|
||||
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
|
||||
}
|
||||
}
|
||||
|
||||
public void setWitherData(String text, double healthPercent)
|
||||
{
|
||||
Iterator<Player> activeIterator = GetActive().iterator();
|
||||
|
||||
while (activeIterator.hasNext())
|
||||
{
|
||||
Player player = activeIterator.next();
|
||||
|
||||
DisguiseBase disguise = Manager.getDisguiseManager().getDisguise(player);
|
||||
|
||||
if (disguise == null || !(disguise instanceof DisguiseWither))
|
||||
{
|
||||
DisableCustom(player);
|
||||
activeIterator.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
((DisguiseWither)disguise).setName(text);
|
||||
((DisguiseWither)disguise).setHealth((float) (healthPercent * 300));
|
||||
Manager.getDisguiseManager().updateDisguise(disguise);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package mineplex.core.gadget.gadgets;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
|
||||
public class ParticleBlizzard extends ParticleGadget
|
||||
{
|
||||
|
||||
public ParticleBlizzard(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Test", new String[]
|
||||
{
|
||||
C.cWhite + "",
|
||||
},
|
||||
1,
|
||||
Material.FIREWORK, (byte)0);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void playParticle(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player player : GetActive())
|
||||
{
|
||||
if (!shouldDisplay(player))
|
||||
continue;
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
for (int i=0 ; i<2 ; i++)
|
||||
player.getWorld().playEffect(player.getLocation().add(r(1), Math.random() + 0.5, r(1)), Effect.COLOURED_DUST, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0 ; i<2 ; i++)
|
||||
player.getWorld().playEffect(player.getLocation().add(r(2), Math.random() + 0.5, r(2)), Effect.COLOURED_DUST, 0);
|
||||
|
||||
if (Math.random() > 0.95)
|
||||
{
|
||||
UtilFirework.launchFirework(player.getEyeLocation(), Type.BALL, color(), true, true, new Vector(r(0.1),r(0.1),r(0.1)), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Color color()
|
||||
{
|
||||
double r = Math.random();
|
||||
|
||||
if (r > 0.8) return Color.RED;
|
||||
if (r > 0.6) return Color.YELLOW;
|
||||
if (r > 0.4) return Color.LIME;
|
||||
if (r > 0.2) return Color.AQUA;
|
||||
else return Color.FUCHSIA;
|
||||
}
|
||||
|
||||
public double r(double mult)
|
||||
{
|
||||
return (Math.random() - 0.5)*mult;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package mineplex.core.gadget.gadgets;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
|
||||
public class ParticleLegend extends ParticleGadget
|
||||
{
|
||||
public ParticleLegend(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Legendary Aura", new String[]
|
||||
{
|
||||
C.cWhite + "These mystic particle attach to",
|
||||
C.cWhite + "only the most legendary of players!",
|
||||
" ",
|
||||
C.cPurple + "Unlocked with Legend Rank",
|
||||
},
|
||||
-2,
|
||||
Material.ENDER_PORTAL, (byte)0);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void playParticle(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player player : GetActive())
|
||||
{
|
||||
if (!shouldDisplay(player))
|
||||
continue;
|
||||
|
||||
player.getWorld().playEffect(player.getLocation().add(0, 1, 0), Effect.ENDER_SIGNAL, 0);
|
||||
}
|
||||
}
|
||||
}
|
@ -51,8 +51,8 @@ public class MountSheep extends HorseMount
|
||||
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE));
|
||||
|
||||
DisguiseSheep disguise = new DisguiseSheep(horse);
|
||||
disguise.SetName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguise.setCustomNameVisible(true);
|
||||
//disguise.setColor(DyeColor.getByColor(org.bukkit.Color.fromRGB(100, 0, 200)));
|
||||
Manager.getDisguiseManager().disguise(disguise);
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class PetFactory
|
||||
_pets.put(EntityType.WOLF, new Pet("Dog", EntityType.WOLF, 8000));
|
||||
_pets.put(EntityType.OCELOT, new Pet("Cat", EntityType.OCELOT, 6000));
|
||||
_pets.put(EntityType.MUSHROOM_COW, new Pet("Mooshroom", EntityType.MUSHROOM_COW, 5000));
|
||||
//_pets.put(EntityType.WITHER, new Pet("Widder", EntityType.SHEEP, 5));
|
||||
_pets.put(EntityType.WITHER, new Pet("Widder", EntityType.WITHER, -1));
|
||||
|
||||
List<PetSalesToken> petTokens = new ArrayList<PetSalesToken>();
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
package mineplex.core.pet;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.MiniClientPlugin;
|
||||
import mineplex.core.pet.repository.PetRepository;
|
||||
import mineplex.core.pet.repository.token.ClientPetTokenWrapper;
|
||||
import mineplex.core.pet.types.CustomWither;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
@ -17,6 +19,7 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import net.minecraft.server.v1_7_R4.EntityCreature;
|
||||
import net.minecraft.server.v1_7_R4.EntityWither;
|
||||
import net.minecraft.server.v1_7_R4.Navigation;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -24,10 +27,13 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.entity.Zombie;
|
||||
@ -35,6 +41,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
@ -140,7 +147,27 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
return;
|
||||
}
|
||||
|
||||
Creature pet = (Creature)_creatureModule.SpawnEntity(location, entityType);
|
||||
Creature pet;
|
||||
|
||||
if (entityType == EntityType.WITHER)
|
||||
{
|
||||
_creatureModule.SetForce(true);
|
||||
EntityWither wither = new CustomWither(((CraftWorld) location.getWorld()).getHandle());
|
||||
wither.Silent = true;
|
||||
wither.setLocation(location.getX(), location.getY(), location.getZ(), 0, 0);
|
||||
((CraftWorld) location.getWorld()).getHandle().addEntity(wither, SpawnReason.CUSTOM);
|
||||
pet = (Creature) wither.getBukkitEntity();
|
||||
_creatureModule.SetForce(false);
|
||||
|
||||
Entity silverfish = _creatureModule.SpawnEntity(location, EntityType.SILVERFISH);
|
||||
UtilEnt.Vegetate(silverfish, true);
|
||||
((LivingEntity) silverfish).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
|
||||
pet.setPassenger(silverfish);
|
||||
}
|
||||
else
|
||||
{
|
||||
pet = (Creature)_creatureModule.SpawnEntity(location, entityType);
|
||||
}
|
||||
|
||||
//Named Pet
|
||||
if (Get(player).GetPets().get(entityType) != null && Get(player).GetPets().get(entityType).length() > 0)
|
||||
@ -367,4 +394,9 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
RemovePet(player, true);
|
||||
}
|
||||
|
||||
public Collection<Creature> getPets()
|
||||
{
|
||||
return _activePetOwners.values();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,196 @@
|
||||
package mineplex.core.pet.types;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_7_R4.SpigotTimings;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.EntityTypes;
|
||||
import net.minecraft.server.v1_7_R4.EntityWither;
|
||||
import net.minecraft.server.v1_7_R4.MathHelper;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
public class CustomWither extends EntityWither
|
||||
{
|
||||
static
|
||||
{
|
||||
try
|
||||
{
|
||||
Field f = EntityTypes.class.getDeclaredField("f");
|
||||
f.setAccessible(true);
|
||||
HashMap map = (HashMap) f.get(null);
|
||||
map.put(CustomWither.class, (int) EntityType.WITHER.getTypeId());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
private int bq;
|
||||
|
||||
public CustomWither(World world)
|
||||
{
|
||||
super(world);
|
||||
s(530);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void bn()
|
||||
{
|
||||
this.aU += 1;
|
||||
this.world.methodProfiler.a("checkDespawn");
|
||||
w();
|
||||
this.world.methodProfiler.b();
|
||||
|
||||
if (this.fromMobSpawner)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.world.methodProfiler.a("sensing");
|
||||
this.getEntitySenses().a();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("targetSelector");
|
||||
this.targetSelector.a();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("goalSelector");
|
||||
this.goalSelector.a();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("navigation");
|
||||
this.getNavigation().f();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("mob tick");
|
||||
bp();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("controls");
|
||||
this.world.methodProfiler.a("move");
|
||||
this.getControllerMove().c();
|
||||
this.world.methodProfiler.c("look");
|
||||
this.getControllerLook().a();
|
||||
this.world.methodProfiler.c("jump");
|
||||
this.getControllerJump().b();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e()
|
||||
{
|
||||
if (this.bq > 0)
|
||||
{
|
||||
this.bq -= 1;
|
||||
}
|
||||
|
||||
if (this.bg > 0)
|
||||
{
|
||||
double d0 = this.locX + (this.bh - this.locX) / this.bg;
|
||||
double d1 = this.locY + (this.bi - this.locY) / this.bg;
|
||||
double d2 = this.locZ + (this.bj - this.locZ) / this.bg;
|
||||
double d3 = MathHelper.g(this.bk - this.yaw);
|
||||
|
||||
this.yaw = ((float) (this.yaw + d3 / this.bg));
|
||||
this.pitch = ((float) (this.pitch + (this.bl - this.pitch) / this.bg));
|
||||
this.bg -= 1;
|
||||
|
||||
if (!this.Vegetated)
|
||||
{
|
||||
setPosition(d0, d1, d2);
|
||||
}
|
||||
b(this.yaw, this.pitch);
|
||||
}
|
||||
else if (!br())
|
||||
{
|
||||
this.motX *= 0.98D;
|
||||
this.motY *= 0.98D;
|
||||
this.motZ *= 0.98D;
|
||||
}
|
||||
|
||||
if (Math.abs(this.motX) < 0.005D)
|
||||
{
|
||||
this.motX = 0.0D;
|
||||
}
|
||||
|
||||
if (Math.abs(this.motY) < 0.005D)
|
||||
{
|
||||
this.motY = 0.0D;
|
||||
}
|
||||
|
||||
if (Math.abs(this.motZ) < 0.005D)
|
||||
{
|
||||
this.motZ = 0.0D;
|
||||
}
|
||||
|
||||
this.world.methodProfiler.a("ai");
|
||||
SpigotTimings.timerEntityAI.startTiming();
|
||||
if (bh())
|
||||
{
|
||||
this.bc = false;
|
||||
this.bd = 0.0F;
|
||||
this.be = 0.0F;
|
||||
this.bf = 0.0F;
|
||||
}
|
||||
else if (br())
|
||||
{
|
||||
if (bk())
|
||||
{
|
||||
this.world.methodProfiler.a("newAi");
|
||||
bn();
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.world.methodProfiler.a("oldAi");
|
||||
bq();
|
||||
this.world.methodProfiler.b();
|
||||
this.aO = this.yaw;
|
||||
}
|
||||
}
|
||||
SpigotTimings.timerEntityAI.stopTiming();
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("jump");
|
||||
if (this.bc)
|
||||
{
|
||||
if ((!M()) && (!P()))
|
||||
{
|
||||
if ((this.onGround) && (this.bq == 0))
|
||||
{
|
||||
bj();
|
||||
this.bq = 10;
|
||||
}
|
||||
}
|
||||
else
|
||||
this.motY += 0.03999999910593033D;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.bq = 0;
|
||||
}
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("travel");
|
||||
this.bd *= 0.98F;
|
||||
this.be *= 0.98F;
|
||||
this.bf *= 0.9F;
|
||||
SpigotTimings.timerEntityAIMove.startTiming();
|
||||
e(this.bd, this.be);
|
||||
SpigotTimings.timerEntityAIMove.stopTiming();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("push");
|
||||
if (!this.world.isStatic)
|
||||
{
|
||||
SpigotTimings.timerEntityAICollision.startTiming();
|
||||
bo();
|
||||
SpigotTimings.timerEntityAICollision.stopTiming();
|
||||
}
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float bf()
|
||||
{
|
||||
return 0.4F;
|
||||
}
|
||||
}
|
@ -18,9 +18,9 @@ public class BuildingPage extends ShopPageBase<ClansManager, BuildingShop>
|
||||
protected void BuildPage()
|
||||
{
|
||||
addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64));
|
||||
addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Wood", 25, 64));
|
||||
addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64));
|
||||
addPvpItem(1, new PvpItem(Material.STONE, (byte)0, 1, "Stone", 25, 64));
|
||||
addPvpItem(1, new PvpItem(Material.WOOD, (byte)0, 1, "Wood", 15, 64));
|
||||
addPvpItem(1, new PvpItem(Material.BRICK, (byte)0, 1, "Bricks", 30, 64));
|
||||
addPvpItem(1, new PvpItem(Material.SANDSTONE, (byte)0, 1, "Sandstone", 30, 64));
|
||||
}
|
||||
|
||||
public void addPvpItem(int slot, PvpItem item)
|
||||
|
@ -5,9 +5,11 @@ import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.entity.Egg;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -50,6 +52,7 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
@ -127,6 +130,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
private NewsManager _news;
|
||||
private AchievementManager _achievementManager;
|
||||
private TreasureManager _treasureManager;
|
||||
private PetManager _petManager;
|
||||
|
||||
private Location _spawn;
|
||||
private int _scoreboardTick = 0;
|
||||
@ -180,6 +184,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
_treasureManager = new TreasureManager(_plugin, donationManager, _inventoryManager, petManager, _blockRestore, hologramManager);
|
||||
new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager);
|
||||
|
||||
_petManager = petManager;
|
||||
_partyManager = partyManager;
|
||||
_preferences = preferences;
|
||||
_tutorialManager = new TutorialManager(this, donationManager, taskManager, _textCreator);
|
||||
@ -454,8 +459,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
if (ChatColor.stripColor(((LivingEntity)entity).getCustomName()).equalsIgnoreCase("Block Hunt"))
|
||||
{
|
||||
DisguiseSlime disguise = new DisguiseSlime(entity);
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.SetName(((LivingEntity)entity).getCustomName(), null);
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.setName(((LivingEntity)entity).getCustomName(), null);
|
||||
disguise.SetSize(2);
|
||||
_disguiseManager.disguise(disguise);
|
||||
}
|
||||
@ -513,7 +518,15 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
UtilTabTitle.setHeaderAndFooter(player, " ", "Visit " + C.cGreen + "www.mineplex.com" + ChatColor.RESET + " for News, Forums and Shop");
|
||||
|
||||
//Public Message
|
||||
if (_clientManager.Get(player).GetRank() != Rank.OWNER)
|
||||
event.setJoinMessage(null);
|
||||
else
|
||||
{
|
||||
event.setJoinMessage(C.cGreen + C.Bold + "Legend " + player.getName() + " has joined!");
|
||||
UtilFirework.playFirework(player.getEyeLocation(), org.bukkit.FireworkEffect.Type.BALL_LARGE, Color.LIME, true, true);
|
||||
player.getWorld().playSound(player.getEyeLocation(), Sound.WITHER_SPAWN, 2f, 1f);
|
||||
}
|
||||
|
||||
|
||||
//Teleport
|
||||
player.teleport(GetSpawn().add(0, 10, 0));
|
||||
@ -889,6 +902,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
return _spawn.clone();
|
||||
}
|
||||
|
||||
public PetManager getPetManager()
|
||||
{
|
||||
return _petManager;
|
||||
}
|
||||
|
||||
public TutorialManager GetTutorial()
|
||||
{
|
||||
return _tutorialManager;
|
||||
|
@ -20,6 +20,7 @@ import mineplex.core.disguise.disguises.DisguiseBat;
|
||||
import mineplex.core.disguise.disguises.DisguiseChicken;
|
||||
import mineplex.core.disguise.disguises.DisguiseCreeper;
|
||||
import mineplex.core.disguise.disguises.DisguiseEnderman;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.hub.HubManager;
|
||||
@ -45,7 +46,8 @@ public class JumpManager extends MiniPlugin
|
||||
|
||||
//Chicken Cancel
|
||||
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
|
||||
if (disguise != null && ((disguise instanceof DisguiseChicken && !((DisguiseChicken)disguise).isBaby()) || disguise instanceof DisguiseBat || disguise instanceof DisguiseEnderman))
|
||||
if (disguise != null &&
|
||||
((disguise instanceof DisguiseChicken && !((DisguiseChicken)disguise).isBaby()) || disguise instanceof DisguiseBat || disguise instanceof DisguiseEnderman || disguise instanceof DisguiseWither))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
@ -5,7 +5,9 @@ import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
@ -14,12 +16,14 @@ import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.gadget.gadgets.MorphWither;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.mount.Mount;
|
||||
import mineplex.core.mount.types.MountDragon;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -256,12 +260,28 @@ public class NewsManager extends MiniPlugin
|
||||
|
||||
UtilTextTop.display(text, UtilServer.getPlayers());
|
||||
|
||||
for (Creature pet : Manager.getPetManager().getPets())
|
||||
{
|
||||
if (pet instanceof Wither)
|
||||
{
|
||||
pet.setCustomName(text);
|
||||
}
|
||||
}
|
||||
|
||||
for (Mount mount : Manager.GetMount().getMounts())
|
||||
{
|
||||
if (mount instanceof MountDragon)
|
||||
{
|
||||
((MountDragon)mount).SetName(text);
|
||||
((MountDragon)mount).setHealthPercent(healthPercent);
|
||||
//((MountDragon)mount).setHealthPercent(healthPercent);
|
||||
}
|
||||
}
|
||||
|
||||
for (Gadget gadget : Manager.GetGadget().getGadgets(GadgetType.Morph))
|
||||
{
|
||||
if (gadget instanceof MorphWither)
|
||||
{
|
||||
((MorphWither)gadget).setWitherData(text, healthPercent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
@ -117,7 +118,7 @@ public class StackerManager extends MiniPlugin implements IThrown
|
||||
|
||||
if (stackee instanceof LivingEntity)
|
||||
{
|
||||
if (((LivingEntity)stackee).isCustomNameVisible())
|
||||
if (Manager.getPetManager().getPets().contains(stackee) || stackee instanceof Wither || stackee instanceof EnderDragon || ((LivingEntity)stackee).isCustomNameVisible())
|
||||
{
|
||||
UtilPlayer.message(stacker, F.main("Stacker", "You cannot stack this entity."));
|
||||
return;
|
||||
|
@ -49,8 +49,8 @@ public class KitBabyPig extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
disguise.SetName(C.cYellow + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cYellow + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.setBaby();
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class KitPig extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
disguise.SetName(C.cYellow + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cYellow + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ public class KitSheepPig extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSheep disguise = new DisguiseSheep(player);
|
||||
disguise.SetName(C.cYellow + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cYellow + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.setColor(DyeColor.PINK);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ public class KitHumanPeasant extends KitHuman
|
||||
player.setHealth(4);
|
||||
|
||||
DisguiseWolf disguise = new DisguiseWolf(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ public class KitUndeadArcher extends KitUndead
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ public class KitUndeadGhoul extends KitUndead
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_AXE));
|
||||
|
||||
DisguisePigZombie disguise = new DisguisePigZombie(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ public class KitUndeadZombie extends KitUndead
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
{
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
}
|
||||
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
@ -44,8 +44,8 @@ public class KitAlphaChaser extends AbstractKitChaser
|
||||
|
||||
//Disguise
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetName(C.cRed + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cRed + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.hideArmor();
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
@ -41,8 +41,8 @@ public class KitChaser extends AbstractKitChaser
|
||||
|
||||
//Disguise
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetName(C.cRed + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cRed + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.hideArmor();
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
@ -50,8 +50,8 @@ public class KitBlaze extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class KitChicken extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ public class KitCreeper extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseCreeper disguise = new DisguiseCreeper(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -50,8 +50,8 @@ public class KitGolem extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseIronGolem disguise = new DisguiseIronGolem(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class KitSkeleton extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class KitSlime extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSlime disguise = new DisguiseSlime(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.SetSize(3);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class KitSnowman extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ public class KitSpider extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSpider disguise = new DisguiseSpider(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class KitWolf extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseBat disguise = new DisguiseBat(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class KitHiderTeleporter extends Kit
|
||||
|
||||
DisguiseSlime slime = new DisguiseSlime(player);
|
||||
slime.SetSize(2);
|
||||
slime.SetName(C.cAqua + player.getName());
|
||||
slime.setName(C.cAqua + player.getName());
|
||||
Manager.GetDisguise().disguise(slime);
|
||||
}
|
||||
|
||||
|
@ -71,8 +71,8 @@ public class KitCow extends SmashKit
|
||||
|
||||
//Disguise
|
||||
DisguiseCow disguise = new DisguiseCow(player);
|
||||
disguise.SetName(C.cRed + player.getName());//+ " the Furious Cow");
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cRed + player.getName());//+ " the Furious Cow");
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,11 @@ public class KitBlaze extends SmashKit
|
||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,11 @@ public class KitChicken extends SmashKit
|
||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -63,11 +63,11 @@ public class KitCow extends SmashKit
|
||||
DisguiseCow disguise = new DisguiseCow(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -88,11 +88,11 @@ public class KitCreeper extends SmashKit
|
||||
DisguiseCreeper disguise = new DisguiseCreeper(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ public class KitEnderman extends SmashKit
|
||||
DisguiseEnderman disguise = new DisguiseEnderman(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.a(false);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
|
@ -79,11 +79,11 @@ public class KitGolem extends SmashKit
|
||||
DisguiseIronGolem disguise = new DisguiseIronGolem(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -95,11 +95,11 @@ public class KitKnight extends SmashKit
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
//Horse
|
||||
|
@ -74,11 +74,11 @@ public class KitMagmaCube extends SmashKit
|
||||
DisguiseMagmaCube disguise = new DisguiseMagmaCube(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
disguise.SetSize(1);
|
||||
|
@ -93,11 +93,11 @@ public class KitPig extends SmashKit
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -92,13 +92,13 @@ public class KitSheep extends SmashKit
|
||||
DisguiseSheep disguise = new DisguiseSheep(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.setColor(DyeColor.WHITE);
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -93,11 +93,11 @@ public class KitSkeletalHorse extends SmashKit
|
||||
disguise.setType(Variant.SKELETON_HORSE);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -86,11 +86,11 @@ public class KitSkeleton extends SmashKit
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.hideArmor();
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
@ -67,11 +67,11 @@ public class KitSkySquid extends SmashKit
|
||||
DisguiseSquid disguise = new DisguiseSquid(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -75,11 +75,11 @@ public class KitSlime extends SmashKit
|
||||
DisguiseSlime disguise = new DisguiseSlime(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
disguise.SetSize(3);
|
||||
|
@ -87,11 +87,11 @@ public class KitSnowman extends SmashKit
|
||||
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -94,11 +94,11 @@ public class KitSpider extends SmashKit
|
||||
DisguiseSpider disguise = new DisguiseSpider(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -83,11 +83,11 @@ public class KitWitch extends SmashKit
|
||||
DisguiseWitch disguise = new DisguiseWitch(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -74,11 +74,11 @@ public class KitWitherSkeleton extends SmashKit
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
disguise.hideArmor();
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
@ -78,11 +78,11 @@ public class KitWolf extends SmashKit
|
||||
DisguiseWolf disguise = new DisguiseWolf(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ public class KitRifle extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSquid disguise = new DisguiseSquid(player);
|
||||
disguise.SetName(C.cWhite + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cWhite + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ public class KitShotgun extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSquid disguise = new DisguiseSquid(player);
|
||||
disguise.SetName(C.cWhite + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cWhite + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ public class KitSniper extends Kit
|
||||
|
||||
//Disguise
|
||||
DisguiseSquid disguise = new DisguiseSquid(player);
|
||||
disguise.SetName(C.cWhite + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(C.cWhite + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -73,11 +73,11 @@ public class KitWitherMinion extends Kit
|
||||
DisguiseWither disguise = new DisguiseWither(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -54,11 +54,11 @@ public class KitWitherWeb extends Kit
|
||||
DisguiseWither disguise = new DisguiseWither(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ public class KitUndeadAlpha extends Kit
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,8 @@ public class KitUndeadZombie extends Kit
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_AXE));
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
}
|
||||
}
|
||||
|
@ -69,11 +69,11 @@ public class PerkPigZombie extends Perk
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
//Sound
|
||||
@ -102,11 +102,11 @@ public class PerkPigZombie extends Perk
|
||||
DisguisePigZombie disguise = new DisguisePigZombie(player);
|
||||
|
||||
if (Manager.GetGame().GetTeam(player) != null)
|
||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
||||
else
|
||||
disguise.SetName(player.getName());
|
||||
disguise.setName(player.getName());
|
||||
|
||||
disguise.SetCustomNameVisible(true);
|
||||
disguise.setCustomNameVisible(true);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
//Sound
|
||||
|
@ -13,6 +13,9 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextBottom;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.gadget.gadgets.MorphWither;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.core.mount.Mount;
|
||||
import mineplex.core.mount.types.MountDragon;
|
||||
@ -39,7 +42,9 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -84,6 +89,15 @@ public class GameManager implements Listener
|
||||
//Display IP
|
||||
UtilTextTop.displayProgress(text, health, UtilServer.getPlayers());
|
||||
|
||||
for (Creature pet : Manager.getCosmeticManager().getPetManager().getPets())
|
||||
{
|
||||
if (pet instanceof Wither)
|
||||
{
|
||||
pet.setCustomName(text);
|
||||
pet.setHealth(Math.max(0.1, 300 * health));
|
||||
}
|
||||
}
|
||||
|
||||
//Name Dragons Appropriately
|
||||
for (Mount mount : Manager.getCosmeticManager().getMountManager().getMounts())
|
||||
{
|
||||
@ -93,6 +107,14 @@ public class GameManager implements Listener
|
||||
((MountDragon) mount).setHealthPercent(health);
|
||||
}
|
||||
}
|
||||
|
||||
for (Gadget gadget : Manager.getCosmeticManager().getGadgetManager().getGadgets(GadgetType.Morph))
|
||||
{
|
||||
if (gadget instanceof MorphWither)
|
||||
{
|
||||
((MorphWither)gadget).setWitherData(text, health);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user