Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
3e02806b75
@ -4,7 +4,7 @@
|
||||
<path id="classpath">
|
||||
<fileset dir="${lib.dir}" includes="**/*.jar"/>
|
||||
</path>
|
||||
<target name="compileArcade" description="Arcade Compilation">
|
||||
<target name="compileArcade1" description="Arcade Compilation Step 1">
|
||||
<javac srcdir="../Mineplex.Core.Common/src" destdir="../Mineplex.Core.Common/bin" classpathref="classpath"/>
|
||||
<jar jarfile="../bin/Mineplex.Core.Common.jar">
|
||||
<fileset dir="../Mineplex.Core.Common/bin">
|
||||
@ -12,6 +12,32 @@
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy file="../bin/Mineplex.Core.Common.jar" todir="../Libraries"/>
|
||||
</target>
|
||||
<target name="compileArcade2" description="Arcade Compilation Step 2">
|
||||
<path id="classpathCommon">
|
||||
<fileset dir="../Libraries" includes="**/*.jar"/>
|
||||
</path>
|
||||
<javac srcdir="../Mineplex.ServerData/src" destdir="../Mineplex.ServerData/bin" classpathref="classpathCommon"/>
|
||||
<jar jarfile="../bin/Mineplex.ServerData.jar">
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy file="../bin/Mineplex.ServerData.jar" todir="../Libraries"/>
|
||||
</target>
|
||||
<target name="compileArcade3" description="Arcade Compilation Step 3">
|
||||
<path id="classpathCommon">
|
||||
<fileset dir="../Libraries" includes="**/*.jar"/>
|
||||
</path>
|
||||
<javac srcdir="../Mineplex.Database/src" destdir="../Mineplex.Database/bin" classpathref="classpathCommon"/>
|
||||
<jar jarfile="../bin/Mineplex.Database.jar">
|
||||
<fileset dir="../Mineplex.Database/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy file="../bin/Mineplex.Database.jar" todir="../Libraries"/>
|
||||
</target>
|
||||
<target name="compileArcade4" description="Arcade Compilation Step 4">
|
||||
<path id="classpathCommon">
|
||||
<fileset dir="../Libraries" includes="**/*.jar"/>
|
||||
</path>
|
||||
@ -22,13 +48,15 @@
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy file="../bin/Mineplex.Core.jar" todir="../Libraries"/>
|
||||
</target>
|
||||
<target name="compileArcade" description="Arcade Compilation Step #">
|
||||
</target>
|
||||
<target name="compileArcade5" description="Arcade Compilation Step 5">
|
||||
<path id="classpathCommon">
|
||||
<fileset dir="../Libraries" includes="**/*.jar"/>
|
||||
</path>
|
||||
<javac srcdir="../Mineplex.Minecraft.Game.Core/src" destdir="../Mineplex.Minecraft.Game.Core/bin" classpathref="classpathCommon"/>
|
||||
<javac srcdir="../Mineplex.Minecraft.Game.ClassCombat/src" destdir="../Mineplex.Minecraft.Game.ClassCombat/bin" classpathref="classpathCommon"/>
|
||||
<javac srcdir="../Mineplex.Database/src" destdir="../Mineplex.Database/bin" classpathref="classpathCommon"/>
|
||||
<javac srcdir="../Mineplex.ServerData/src" destdir="../Mineplex.ServerData/bin" classpathref="classpathCommon"/>
|
||||
<javac srcdir="../Nautilus.Game.Arcade/src" destdir="../Nautilus.Game.Arcade/bin" classpathref="classpathCommon"/>
|
||||
</target>
|
||||
<target name ="Arcade" description="Arcade">
|
||||
|
@ -0,0 +1,179 @@
|
||||
package net.minecraft.server.v1_7_R4;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
|
||||
import net.minecraft.server.v1_7_R4.PacketListener;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutListener;
|
||||
|
||||
public class PacketPlayOutWorldParticles extends Packet {
|
||||
private String a;
|
||||
private float b;
|
||||
private float c;
|
||||
private float d;
|
||||
private float e;
|
||||
private float f;
|
||||
private float g;
|
||||
private float h;
|
||||
private int i;
|
||||
private boolean _displayFar;
|
||||
|
||||
public PacketPlayOutWorldParticles() {
|
||||
}
|
||||
|
||||
public PacketPlayOutWorldParticles(String s, float f, float f1, float f2, float f3, float f4, float f5, float f6, int i) {
|
||||
this(s, f, f1, f2, f3, f4, f5, f6, i, false);
|
||||
}
|
||||
|
||||
public PacketPlayOutWorldParticles(String s, float f, float f1, float f2, float f3, float f4, float f5, float f6, int i, boolean displayFar) {
|
||||
this.a = s;
|
||||
this.b = f;
|
||||
this.c = f1;
|
||||
this.d = f2;
|
||||
this.e = f3;
|
||||
this.f = f4;
|
||||
this.g = f5;
|
||||
this.h = f6;
|
||||
this.i = i;
|
||||
|
||||
_displayFar = displayFar;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.c(64);
|
||||
this.b = packetdataserializer.readFloat();
|
||||
this.c = packetdataserializer.readFloat();
|
||||
this.d = packetdataserializer.readFloat();
|
||||
this.e = packetdataserializer.readFloat();
|
||||
this.f = packetdataserializer.readFloat();
|
||||
this.g = packetdataserializer.readFloat();
|
||||
this.h = packetdataserializer.readFloat();
|
||||
this.i = packetdataserializer.readInt();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
String[] parts = this.a.split("_");
|
||||
PacketPlayOutWorldParticles.Particle particle = PacketPlayOutWorldParticles.Particle.find(parts[0]);
|
||||
if(particle == null) {
|
||||
particle = PacketPlayOutWorldParticles.Particle.CRIT;
|
||||
}
|
||||
|
||||
if(packetdataserializer.version < 17) {
|
||||
packetdataserializer.a(this.a);
|
||||
} else {
|
||||
packetdataserializer.writeInt(particle.ordinal());
|
||||
packetdataserializer.writeBoolean(_displayFar);
|
||||
}
|
||||
|
||||
packetdataserializer.writeFloat(this.b);
|
||||
packetdataserializer.writeFloat(this.c);
|
||||
packetdataserializer.writeFloat(this.d);
|
||||
packetdataserializer.writeFloat(this.e);
|
||||
packetdataserializer.writeFloat(this.f);
|
||||
packetdataserializer.writeFloat(this.g);
|
||||
packetdataserializer.writeFloat(this.h);
|
||||
packetdataserializer.writeInt(this.i);
|
||||
if(packetdataserializer.version >= 17) {
|
||||
for(int i = 0; i < particle.extra; ++i) {
|
||||
int toWrite = 0;
|
||||
if(parts.length - 1 > i) {
|
||||
try {
|
||||
toWrite = Integer.parseInt(parts[i + 1]);
|
||||
if(particle.extra == 1 && parts.length == 3) {
|
||||
++i;
|
||||
toWrite |= Integer.parseInt(parts[i + 1]) << 12;
|
||||
}
|
||||
} catch (NumberFormatException var7) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
packetdataserializer.b(toWrite);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void a(PacketPlayOutListener packetplayoutlistener) {
|
||||
packetplayoutlistener.a(this);
|
||||
}
|
||||
|
||||
public void handle(PacketListener packetlistener) {
|
||||
this.a((PacketPlayOutListener)packetlistener);
|
||||
}
|
||||
|
||||
private static enum Particle {
|
||||
EXPLOSION_NORMAL("explode"),
|
||||
EXPLOSION_LARGE("largeexplode"),
|
||||
EXPLOSION_HUGE("hugeexplosion"),
|
||||
FIREWORKS_SPARK("fireworksSpark"),
|
||||
WATER_BUBBLE("bubble"),
|
||||
WATER_SPLASH("splash"),
|
||||
WATER_WAKE("wake"),
|
||||
SUSPENDED("suspended"),
|
||||
SUSPENDED_DEPTH("depthsuspend"),
|
||||
CRIT("crit"),
|
||||
CRIT_MAGIC("magicCrit"),
|
||||
SMOKE_NORMAL("smoke"),
|
||||
SMOKE_LARGE("largesmoke"),
|
||||
SPELL("spell"),
|
||||
SPELL_INSTANT("instantSpell"),
|
||||
SPELL_MOB("mobSpell"),
|
||||
SPELL_MOB_AMBIENT("mobSpellAmbient"),
|
||||
SPELL_WITCH("witchMagic"),
|
||||
DRIP_WATER("dripWater"),
|
||||
DRIP_LAVA("dripLava"),
|
||||
VILLAGER_ANGRY("angryVillager"),
|
||||
VILLAGER_HAPPY("happyVillager"),
|
||||
TOWN_AURA("townaura"),
|
||||
NOTE("note"),
|
||||
PORTAL("portal"),
|
||||
ENCHANTMENT_TABLE("enchantmenttable"),
|
||||
FLAME("flame"),
|
||||
LAVA("lava"),
|
||||
FOOTSTEP("footstep"),
|
||||
CLOUD("cloud"),
|
||||
REDSTONE("reddust"),
|
||||
SNOWBALL("snowballpoof"),
|
||||
SNOW_SHOVEL("snowshovel"),
|
||||
SLIME("slime"),
|
||||
HEART("heart"),
|
||||
BARRIER("barrier"),
|
||||
ICON_CRACK("iconcrack", 2),
|
||||
BLOCK_CRACK("blockcrack", 1),
|
||||
BLOCK_DUST("blockdust", 1),
|
||||
WATER_DROP("droplet"),
|
||||
ITEM_TAKE("take"),
|
||||
MOB_APPEARANCE("mobappearance");
|
||||
|
||||
public final String name;
|
||||
public final int extra;
|
||||
private static final HashMap<String, PacketPlayOutWorldParticles.Particle> particleMap;
|
||||
|
||||
private Particle(String name) {
|
||||
this(name, 0);
|
||||
}
|
||||
|
||||
private Particle(String name, int extra) {
|
||||
this.name = name;
|
||||
this.extra = extra;
|
||||
}
|
||||
|
||||
public static PacketPlayOutWorldParticles.Particle find(String part) {
|
||||
return (PacketPlayOutWorldParticles.Particle)particleMap.get(part);
|
||||
}
|
||||
|
||||
static {
|
||||
particleMap = new HashMap();
|
||||
PacketPlayOutWorldParticles.Particle[] var0 = values();
|
||||
int var1 = var0.length;
|
||||
|
||||
for(int var2 = 0; var2 < var1; ++var2) {
|
||||
PacketPlayOutWorldParticles.Particle particle = var0[var2];
|
||||
particleMap.put(particle.name, particle);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
@ -56,8 +56,8 @@ public class MotdManager implements Listener, Runnable
|
||||
// Add in default MOTD listing to database
|
||||
|
||||
List<String> lines = new ArrayList<String>();
|
||||
lines.add(" §e§lNEW GAME §a§lWizards!");
|
||||
lines.add(" §d§lRank Sale §a§l40% Off");
|
||||
lines.add(" §d§lMaster Builders§f - §d§lWizards§f - §d§lGravity");
|
||||
//lines.add(" §d§lRank Sale §a§l40% Off");
|
||||
|
||||
updateMainMotd(" §b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r", lines);
|
||||
|
||||
|
@ -2,6 +2,7 @@ package mineplex.core.common.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutWorldParticles;
|
||||
|
||||
import org.bukkit.Location;
|
||||
@ -10,6 +11,27 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class UtilParticle
|
||||
{
|
||||
public enum ViewDist
|
||||
{
|
||||
SHORT(8),
|
||||
NORMAL(24),
|
||||
LONG(48),
|
||||
LONGER(96),
|
||||
MAX(256);
|
||||
|
||||
private int _dist;
|
||||
|
||||
ViewDist(int dist)
|
||||
{
|
||||
_dist = dist;
|
||||
}
|
||||
|
||||
public int getDist()
|
||||
{
|
||||
return _dist;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ParticleType
|
||||
{
|
||||
ANGRY_VILLAGER("angryVillager", "Lightning Cloud", Material.INK_SACK, (byte) 11),
|
||||
@ -179,95 +201,30 @@ public class UtilParticle
|
||||
}
|
||||
|
||||
private static PacketPlayOutWorldParticles getPacket(String particleName, Location location, float offsetX, float offsetY,
|
||||
float offsetZ, float speed, int count)
|
||||
float offsetZ, float speed, int count, boolean displayFar)
|
||||
{
|
||||
|
||||
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles();
|
||||
|
||||
for (Field field : packet.getClass().getDeclaredFields())
|
||||
{
|
||||
try
|
||||
{
|
||||
field.setAccessible(true);
|
||||
String fieldName = field.getName();
|
||||
switch (fieldName)
|
||||
{
|
||||
case "a":
|
||||
field.set(packet, particleName); // Particle name
|
||||
break;
|
||||
case "b":
|
||||
field.setFloat(packet, (float) location.getX()); // Block X
|
||||
break;
|
||||
case "c":
|
||||
field.setFloat(packet, (float) location.getY()); // Block Y
|
||||
break;
|
||||
case "d":
|
||||
field.setFloat(packet, (float) location.getZ()); // Block Z
|
||||
break;
|
||||
case "e":
|
||||
field.setFloat(packet, offsetX); // Random X Offset
|
||||
break;
|
||||
case "f":
|
||||
field.setFloat(packet, offsetY); // Random Y Offset
|
||||
break;
|
||||
case "g":
|
||||
field.setFloat(packet, offsetZ); // Random Z Offset
|
||||
break;
|
||||
case "h":
|
||||
field.setFloat(packet, speed); // Speed/data of particles
|
||||
break;
|
||||
case "i":
|
||||
field.setInt(packet, count); // Amount of particles
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleName, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, displayFar);
|
||||
return packet;
|
||||
}
|
||||
|
||||
public static void PlayParticle(ParticleType type, Location location, float offsetX, float offsetY, float offsetZ,
|
||||
float speed, int count)
|
||||
public static void PlayParticle(ParticleType type,Location location, float offsetX, float offsetY, float offsetZ,
|
||||
float speed, int count, ViewDist dist, Player... players)
|
||||
{
|
||||
PlayParticle(type.particleName, location, offsetX, offsetY, offsetZ, speed, count);
|
||||
PlayParticle(type.particleName, location, offsetX, offsetY, offsetZ, speed, count, dist, players);
|
||||
}
|
||||
|
||||
public static void PlayParticle(Player player, ParticleType type, Location location, float offsetX, float offsetY,
|
||||
float offsetZ, float speed, int count)
|
||||
public static void PlayParticle(String particle, Location location, float offsetX, float offsetY, float offsetZ,
|
||||
float speed, int count, ViewDist dist, Player... players)
|
||||
{
|
||||
PlayParticle(player, type.particleName, location, offsetX, offsetY, offsetZ, speed, count);
|
||||
}
|
||||
PacketPlayOutWorldParticles packet = getPacket(particle, location, offsetX, offsetY, offsetZ, speed, count, true);
|
||||
|
||||
public static void PlayParticle(Player player, String particleName, Location location, float offsetX, float offsetY,
|
||||
float offsetZ, float speed, int count)
|
||||
{
|
||||
PacketPlayOutWorldParticles packet = getPacket(particleName, location, offsetX, offsetY, offsetZ, speed, count);
|
||||
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
|
||||
public static void PlayParticle(String particleName, Location location, float offsetX, float offsetY, float offsetZ,
|
||||
float speed, int count)
|
||||
{
|
||||
PacketPlayOutWorldParticles packet = getPacket(particleName, location, offsetX, offsetY, offsetZ, speed, count);
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
for (Player player : players)
|
||||
{
|
||||
// Dont send to players who cannot see it!
|
||||
if (!particleName.equals(ParticleType.FIREWORKS_SPARK.particleName)
|
||||
&& !particleName.equals(ParticleType.LARGE_EXPLODE.particleName)
|
||||
&& !particleName.equals(ParticleType.HUGE_EXPLOSION.particleName))
|
||||
{
|
||||
if (UtilMath.offset(player.getLocation(), location) > 24)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//Out of range for player
|
||||
if (UtilMath.offset(player.getLocation(), location) > dist.getDist())
|
||||
continue;
|
||||
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,82 @@
|
||||
package mineplex.core.common.util;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
public class UtilSkull
|
||||
{
|
||||
public static byte getSkullData(Entity entity)
|
||||
{
|
||||
if (entity instanceof Skeleton)
|
||||
{
|
||||
Skeleton sk = ((Skeleton) entity);
|
||||
if (sk.getSkeletonType() == Skeleton.SkeletonType.WITHER)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else if (entity instanceof Zombie || entity instanceof Giant)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (entity instanceof Creeper)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else
|
||||
return 3;
|
||||
}
|
||||
|
||||
public static boolean isPlayerHead(byte data)
|
||||
{
|
||||
return data == 3;
|
||||
}
|
||||
|
||||
public static String getPlayerHeadName(Entity entity)
|
||||
{
|
||||
String name = "MHF_Alex";
|
||||
|
||||
// order is important for some of these
|
||||
if (entity instanceof Blaze)
|
||||
name = "MHF_Blaze";
|
||||
else if (entity instanceof CaveSpider)
|
||||
name = "MHF_CaveSpider";
|
||||
else if (entity instanceof Spider)
|
||||
name = "MHF_Spider";
|
||||
else if (entity instanceof Chicken)
|
||||
name = "MHF_Chicken";
|
||||
else if (entity instanceof MushroomCow)
|
||||
name = "MHF_MushroomCow";
|
||||
else if (entity instanceof Cow)
|
||||
name = "MHF_Cow";
|
||||
else if (entity instanceof Creeper)
|
||||
name = "MHF_Creeper";
|
||||
else if (entity instanceof Enderman)
|
||||
name = "MHF_Enderman";
|
||||
else if (entity instanceof Ghast)
|
||||
name = "MHF_Ghast";
|
||||
else if (entity instanceof Golem)
|
||||
name = "MHF_Golem";
|
||||
else if (entity instanceof PigZombie)
|
||||
name = "MHF_PigZombie";
|
||||
else if (entity instanceof MagmaCube)
|
||||
name = "MHF_LavaSlime";
|
||||
else if (entity instanceof Slime)
|
||||
name = "MHF_Slime";
|
||||
else if (entity instanceof Ocelot)
|
||||
name = "MHF_Ocelot";
|
||||
else if (entity instanceof PigZombie)
|
||||
name = "MHF_PigZombie";
|
||||
else if (entity instanceof Pig)
|
||||
name = "MHF_Pig";
|
||||
else if (entity instanceof Sheep)
|
||||
name = "MHF_Pig";
|
||||
else if (entity instanceof Squid)
|
||||
name = "MHF_Squid";
|
||||
else if (entity instanceof HumanEntity)
|
||||
name = "MHF_Steve";
|
||||
else if (entity instanceof Villager)
|
||||
name = "MHF_Villager";
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
@ -21,6 +21,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.ItemGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
@ -117,7 +118,8 @@ public class ItemBatGun extends ItemGadget
|
||||
|
||||
//Effect
|
||||
bat.getWorld().playSound(bat.getLocation(), Sound.BAT_HURT, 1f, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, bat.getLocation(), 0, 0, 0, 0, 3);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, bat.getLocation(), 0, 0, 0, 0, 3,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
bat.remove();
|
||||
|
||||
@ -138,7 +140,8 @@ public class ItemBatGun extends ItemGadget
|
||||
for (Bat bat : _bats.get(player))
|
||||
{
|
||||
if (bat.isValid())
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, bat.getLocation(), 0, 0, 0, 0, 3);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, bat.getLocation(), 0, 0, 0, 0, 3,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
bat.remove();
|
||||
}
|
||||
|
@ -11,7 +11,9 @@ import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseBlaze;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
@ -65,8 +67,12 @@ public class MorphBlaze extends MorphGadget
|
||||
player.eject();
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 0.2f, (float)(Math.random()));
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(0, 1, 0), 0.25f, 0.25f, 0.25f, 0f, 3);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation().add(0, 1, 0), 0.1f, 0.1f, 0.1f, 0f, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(0, 1, 0),
|
||||
0.25f, 0.25f, 0.25f, 0f, 3,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation().add(0, 1, 0),
|
||||
0.1f, 0.1f, 0.1f, 0f, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
UtilAction.velocity(player, 0.8, 0.1, 1, true);
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
@ -239,7 +240,8 @@ public class MorphBunny extends MorphGadget
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SPELL, egg.getLocation().add(0, 0.1, 0), 0.1f, 0.1f, 0.1f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.SPELL, egg.getLocation().add(0, 0.1, 0), 0.1f, 0.1f, 0.1f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,9 @@ import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseCreeper;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -98,7 +100,8 @@ public class MorphCreeper extends MorphGadget
|
||||
continue;
|
||||
|
||||
//Explode
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, player.getLocation(), 0, 0.5f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, player.getLocation(), 0, 0.5f, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
player.getWorld().playSound(player.getLocation(), Sound.EXPLODE, 1f, 0.8f);
|
||||
|
||||
player.playEffect(EntityEffect.HURT);
|
||||
|
@ -23,8 +23,10 @@ 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.UtilServer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
@ -115,7 +117,8 @@ public class MorphWither extends MorphGadget
|
||||
|
||||
WitherSkull skull = (WitherSkull)event.getEntity();
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, skull.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, skull.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
skull.getWorld().playSound(skull.getLocation(), Sound.EXPLODE, 2f, 1f);
|
||||
|
||||
HashMap<Player, Double> players = UtilPlayer.getInRadius(event.getLocation(), 6);
|
||||
|
@ -15,7 +15,9 @@ import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import mineplex.core.blood.BloodEvent;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -53,7 +55,8 @@ public class ParticleBlizzard extends ParticleGadget
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -68,11 +71,13 @@ public class ParticleBlizzard extends ParticleGadget
|
||||
double x = Math.sin(r + (i * (Math.PI/4))) * (r%(Math.PI * 4)) * 0.4;
|
||||
double z = Math.cos(r + (i * (Math.PI/4))) * (r%(Math.PI * 4)) * 0.4;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(x, scale * 3, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(x, scale * 3, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
if (scale > 0.95 && Recharge.Instance.use(player, GetName(), 1000, false, false))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, scale * 3.5, 0), 0f, 0f, 0f, 0.2f, 60);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, scale * 3.5, 0), 0f, 0f, 0f, 0.2f, 60,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
player.getWorld().playSound(player.getLocation(), Sound.STEP_SNOW, 1f, 1.5f);
|
||||
}
|
||||
}
|
||||
@ -88,7 +93,8 @@ public class ParticleBlizzard extends ParticleGadget
|
||||
|
||||
if (!event.getPlayer().isFlying())
|
||||
if (IsActive(event.getPlayer()))
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getPlayer().getLocation(), 0f, 0f, 0f, 0.6f, 100);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getPlayer().getLocation(), 0f, 0f, 0f, 0.6f, 100,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -115,7 +121,8 @@ public class ParticleBlizzard extends ParticleGadget
|
||||
if (!_arrows.remove(event.getEntity()))
|
||||
return;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getEntity().getLocation(), 0f, 0f, 0f, 0.4f, 12);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getEntity().getLocation(), 0f, 0f, 0f, 0.4f, 12,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -134,7 +141,8 @@ public class ParticleBlizzard extends ParticleGadget
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, arrow.getLocation(), 0f, 0f, 0f, 0f, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, arrow.getLocation(), 0f, 0f, 0f, 0f, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,9 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -41,11 +43,13 @@ public class ParticleEnchant extends ParticleGadget
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, player.getLocation().add(0, 1.4, 0), 0f, 0f, 0f, 1, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, player.getLocation().add(0, 1.4, 0), 0f, 0f, 0f, 1, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,9 @@ package mineplex.core.gadget.gadgets;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
@ -72,8 +74,10 @@ public class ParticleFairyData
|
||||
Fairy.add(Direction.clone().multiply(Speed));
|
||||
|
||||
//Particle
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Fairy, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, Fairy, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Fairy, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, Fairy, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
//Sound
|
||||
Fairy.getWorld().playSound(Fairy, Sound.CAT_PURREOW, 0.1f, 3f);
|
||||
|
@ -8,7 +8,9 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -42,7 +44,8 @@ public class ParticleFireRings extends ParticleGadget
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(0, 1f, 0), 0.2f, 0.2f, 0.2f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(0, 1f, 0), 0.2f, 0.2f, 0.2f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -55,7 +58,8 @@ public class ParticleFireRings extends ParticleGadget
|
||||
|
||||
float y = (float) (Math.sin(player.getTicksLived()/5d + lead) + 1f);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
for (int i=0 ; i < 1 ; i++)
|
||||
@ -67,7 +71,8 @@ public class ParticleFireRings extends ParticleGadget
|
||||
|
||||
float y = (float) (Math.sin(player.getTicksLived()/5d + lead) + 1f);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Sound
|
||||
|
@ -18,8 +18,10 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -90,9 +92,11 @@ public class ParticleFoot extends ParticleGadget
|
||||
|
||||
_steps.put(loc, System.currentTimeMillis());
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FOOTSTEP, loc, 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FOOTSTEP, loc, 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, loc.clone().add(0, 0.1, 0), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, loc.clone().add(0, 0.1, 0), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -44,7 +46,8 @@ public class ParticleGreen extends ParticleGadget
|
||||
float z = (float) (Math.cos(player.getTicksLived()/7d) * 1f);
|
||||
float y = (float) (Math.cos(player.getTicksLived()/17d) * 1f + 1f);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
// if (Manager.isMoving(player))
|
||||
// {
|
||||
|
@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -79,9 +80,11 @@ public class ParticleHeart extends ParticleGadget
{
|
||||
}
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, player.getLocation().add(0, 1, 0), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, player.getLocation().add(0, 1, 0), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
else
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.5f, 0.5f, 0.5f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.5f, 0.5f, 0.5f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
|
||||
@ -96,7 +99,8 @@ public class ParticleHeart extends ParticleGadget
{
|
||||
|
||||
entry.getValue().add(UtilAlg.getTrajectory(entry.getValue(), entry.getKey().getEyeLocation()).multiply(0.6));
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, entry.getValue(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, entry.getValue(), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
if (UtilMath.offset(entry.getValue(), entry.getKey().getEyeLocation()) < 0.6)
|
||||
heartIterator.remove();
|
||||
|
@ -8,7 +8,9 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -42,7 +44,8 @@ public class ParticleHelix extends ParticleGadget
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -59,7 +62,8 @@ public class ParticleHelix extends ParticleGadget
|
||||
|
||||
float y = 0.15f * height;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation().add(x * (1d - height/22d), y, z * (1d - height/22d)), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation().add(x * (1d - height/22d), y, z * (1d - height/22d)), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.types.ParticleGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -43,17 +44,21 @@ public class ParticleRain extends ParticleGadget
|
||||
|
||||
if (Manager.isMoving(player))
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SPLASH, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.SPLASH, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilParticle.PlayParticle(player, ParticleType.EXPLODE, player.getLocation().add(0, 3.5, 0), 0.6f, 0f, 0.6f, 0, 8);
|
||||
UtilParticle.PlayParticle(ParticleType.EXPLODE, player.getLocation().add(0, 3.5, 0), 0.6f, 0f, 0.6f, 0, 8,
|
||||
ViewDist.NORMAL, player);
|
||||
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
if (!player.equals(other))
|
||||
UtilParticle.PlayParticle(other, ParticleType.CLOUD, player.getLocation().add(0, 3.5, 0), 0.6f, 0.1f, 0.6f, 0, 8);
|
||||
UtilParticle.PlayParticle(ParticleType.CLOUD, player.getLocation().add(0, 3.5, 0), 0.6f, 0.1f, 0.6f, 0, 8,
|
||||
ViewDist.NORMAL, other);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.DRIP_WATER, player.getLocation().add(0, 3.5, 0), 0.4f, 0.1f, 0.4f, 0, 2);
|
||||
UtilParticle.PlayParticle(ParticleType.DRIP_WATER, player.getLocation().add(0, 3.5, 0), 0.4f, 0.1f, 0.4f, 0, 2,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.AMBIENCE_RAIN, 0.1f, 1f);
|
||||
|
@ -1,7 +1,9 @@
|
||||
package mineplex.core.gadget.gadgets;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -29,7 +31,8 @@ public class SongData
|
||||
return true;
|
||||
}
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.NOTE, Block.getLocation().add(0.5, 1, 0.5), 0.5f, 0.5f, 0.5f, 0f, 2);
|
||||
UtilParticle.PlayParticle(ParticleType.NOTE, Block.getLocation().add(0.5, 1, 0.5), 0.5f, 0.5f, 0.5f, 0f, 2,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.mount.DragonData;
|
||||
@ -42,17 +43,11 @@ public class MountDragon extends DragonMount
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
{
|
||||
for (DragonData data : GetActive().values())
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
try
|
||||
{
|
||||
UtilParticle.PlayParticle(player, ParticleType.WITCH_MAGIC, data.Dragon.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0f, 20);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, data.Dragon.getLocation().add(0, 1, 0),
|
||||
1f, 1f, 1f, 0f, 20,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,9 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.mount.HorseMount;
|
||||
import mineplex.core.mount.MountManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -37,7 +39,9 @@ public class MountFrost extends HorseMount
|
||||
{
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
for (Horse horse : GetActive().values())
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, horse.getLocation().add(0, 1, 0), 0.25f, 0.25f, 0.25f, 0.1f, 4);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, horse.getLocation().add(0, 1, 0),
|
||||
0.25f, 0.25f, 0.25f, 0.1f, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
// @EventHandler
|
||||
|
@ -12,6 +12,7 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.mount.HorseMount;
|
||||
import mineplex.core.mount.MountManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -38,11 +39,15 @@ public class MountUndead extends HorseMount
|
||||
{
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
for (Horse horse : GetActive().values())
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, horse.getLocation().add(0, 1, 0), 0.25f, 0.25f, 0.25f, 0, 2);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, horse.getLocation().add(0, 1, 0),
|
||||
0.25f, 0.25f, 0.25f, 0, 2,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
for (Horse horse : GetActive().values())
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, horse.getLocation().add(0, 1, 0), 0.25f, 0.25f, 0.25f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, horse.getLocation().add(0, 1, 0),
|
||||
0.25f, 0.25f, 0.25f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,9 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.disguise.disguises.DisguiseSquid;
|
||||
import net.minecraft.server.v1_7_R4.AxisAlignedBB;
|
||||
@ -93,7 +95,8 @@ public class ProjectileUser
|
||||
_thrown.getWorld().playEffect(_thrown.getLocation(), _effect, _effectData);
|
||||
|
||||
if (_particle != null)
|
||||
UtilParticle.PlayParticle(_particle, _thrown.getLocation(), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(_particle, _thrown.getLocation(), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,12 +13,14 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.util.CraftMagicNumbers;
|
||||
import org.bukkit.entity.Player;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutBlockAction;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutBlockAction;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.reward.Reward;
|
||||
import mineplex.core.reward.RewardData;
|
||||
@ -133,7 +135,8 @@ public class Treasure
|
||||
|
||||
if (_treasureType == TreasureType.OLD)
|
||||
{
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5, 0.5, 0.5), 0F, 0F, 0F, 1, 4);
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5, 0.5, 0.5), 0F, 0F, 0F, 1, 4,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else if (_treasureType == TreasureType.ANCIENT)
|
||||
{
|
||||
@ -141,11 +144,13 @@ public class Treasure
|
||||
double xDif = 0.7 * Math.sin(Math.PI * (_tickCount / 5.0));
|
||||
double zDif = 0.7 * Math.cos(Math.PI * (_tickCount / 5.0));
|
||||
float red = 0.1F + (float)( 0.4 * (1 + Math.cos(Math.PI * (_tickCount / 20.0))));
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5 + xDif, 0.5 + yDif, 0.5 + zDif), red, 0.2F, 0.2F, 1F, 0);
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5 + xDif, 0.5 + yDif, 0.5 + zDif), red, 0.2F, 0.2F, 1F, 0,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5, 0.5, 0.5), 0.5F, 0.5F, 0.5F, 0.2F, 0);
|
||||
UtilParticle.PlayParticle(type, block.getLocation().add(0.5, 0.5, 0.5), 0.5F, 0.5F, 0.5F, 0.2F, 0,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -327,7 +332,8 @@ public class Treasure
|
||||
|
||||
if (block.getType().equals(Material.CHEST))
|
||||
{
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.LARGE_SMOKE, block.getLocation().add(0.5, 0.5, 0.5), 0.5F, 0.5F, 0.5F, 0.1F, 10);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.LARGE_SMOKE, block.getLocation().add(0.5, 0.5, 0.5), 0.5F, 0.5F, 0.5F, 0.1F, 10,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
// block.getLocation().getWorld().createExplosion(block.getLocation().add(0.5, 0.5, 0.5), 0F);
|
||||
}
|
||||
block.getLocation().getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getTypeId());
|
||||
|
@ -12,10 +12,11 @@ import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.MathHelper;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.BlockInfo;
|
||||
import mineplex.core.treasure.Treasure;
|
||||
import mineplex.core.treasure.TreasureType;
|
||||
@ -82,7 +83,8 @@ public class ChestSpawnAnimation extends Animation
|
||||
//Play Particels
|
||||
if (getTreasure().getTreasureType() == TreasureType.OLD)
|
||||
{
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), _centerLocation, 0.1f, 0.1f, 0.1f, 0, 1);
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), _centerLocation, 0.1f, 0.1f, 0.1f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else if (getTreasure().getTreasureType() == TreasureType.ANCIENT)
|
||||
{
|
||||
@ -93,7 +95,8 @@ public class ChestSpawnAnimation extends Animation
|
||||
newLoc.add(UtilAlg.getLeft(_particleDirection).multiply(x * scale));
|
||||
newLoc.add(UtilAlg.getUp(_particleDirection).multiply(z * scale));
|
||||
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), newLoc, 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), newLoc, 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else if (getTreasure().getTreasureType() == TreasureType.MYTHICAL)
|
||||
{
|
||||
@ -107,7 +110,8 @@ public class ChestSpawnAnimation extends Animation
|
||||
float x = (float) (Math.sin(getTicks()/4D + lead));
|
||||
float z = (float) (Math.cos(getTicks()/4D + lead));
|
||||
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), _centerLocation.clone().add(x * width, y, z * width), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), _centerLocation.clone().add(x * width, y, z * width), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +126,8 @@ public class ChestSpawnAnimation extends Animation
|
||||
|
||||
if (particleType != null)
|
||||
{
|
||||
UtilParticle.PlayParticle(particleType, _centerLocation, 0.2f, 0.2f, 0.2f, 0, 50);
|
||||
UtilParticle.PlayParticle(particleType, _centerLocation, 0.2f, 0.2f, 0.2f, 0, 50,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11,6 +11,8 @@ import org.bukkit.block.Block;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.Treasure;
|
||||
|
||||
/**
|
||||
@ -55,7 +57,8 @@ public class LootLegendaryAnimation extends Animation
|
||||
double zDiff = Math.cos(i/(double)particleAmount * 2 * Math.PI) * radius;
|
||||
|
||||
Location location = _centerLocation.clone().add(xDiff, 0, zDiff);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.HAPPY_VILLAGER, location, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.HAPPY_VILLAGER, location, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
else if (getTicks() < 40)
|
||||
|
@ -8,6 +8,8 @@ import org.bukkit.FireworkEffect.Type;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.Treasure;
|
||||
|
||||
/**
|
||||
@ -52,7 +54,8 @@ public class LootRareAnimation extends Animation
|
||||
|
||||
Location location = _centerLocation.clone().add(xDiff, yDiff, zDiff);
|
||||
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.WITCH_MAGIC, location, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.WITCH_MAGIC, location, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Particle Spiral Up
|
||||
@ -64,7 +67,8 @@ public class LootRareAnimation extends Animation
|
||||
double zDiff = Math.cos(i/(double)particleAmount * 2 * Math.PI) * radius;
|
||||
|
||||
Location location = _centerLocation.clone().add(xDiff, -1.3, zDiff);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.WITCH_MAGIC, location, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.WITCH_MAGIC, location, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,8 @@ import org.bukkit.block.Block;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.Treasure;
|
||||
|
||||
/**
|
||||
@ -42,7 +44,8 @@ public class LootUncommonAnimation extends Animation
|
||||
}
|
||||
else if (getTicks() % 2 == 0)
|
||||
{
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.HEART, _block.getLocation().add(0.5, 1.2, 0.5), 0.5F, 0.2F, 0.5F, 0, 1);
|
||||
UtilParticle.PlayParticle(UtilParticle.ParticleType.HEART, _block.getLocation().add(0.5, 1.2, 0.5), 0.5F, 0.2F, 0.5F, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,8 @@ import java.util.ArrayList;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.Treasure;
|
||||
|
||||
/**
|
||||
@ -54,7 +56,8 @@ public class ParticleAnimation extends Animation
|
||||
{
|
||||
Vector position = PATH.get(pathPosition);
|
||||
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), getTreasure().getCenterBlock().getLocation().add(0.5, 0, 0.5).add(position), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), getTreasure().getCenterBlock().getLocation().add(0.5, 0, 0.5).add(position), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
pathPosition = (pathPosition + 1) % PATH.size();
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -26,34 +27,34 @@ import mineplex.hub.HubManager;
|
||||
public class HubVisibilityManager extends MiniPlugin
|
||||
{
|
||||
public HubManager Manager;
|
||||
|
||||
|
||||
private HashMap<Player, Integer> _particle = new HashMap<Player, Integer>();
|
||||
private HashSet<Player> _hiddenPlayers = new HashSet<Player>();
|
||||
|
||||
|
||||
public HubVisibilityManager(HubManager manager)
|
||||
{
|
||||
super("Visibility Manager", manager.getPlugin());
|
||||
|
||||
|
||||
Manager = manager;
|
||||
}
|
||||
|
||||
public void addHiddenPlayer(Player player)
|
||||
{
|
||||
_hiddenPlayers.add(player);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void removeHiddenPlayer(Player player)
|
||||
{
|
||||
_hiddenPlayers.remove(player);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void removeHiddenPlayerOnQuit(PlayerQuitEvent event)
|
||||
{
|
||||
_hiddenPlayers.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void updateVisibility(UpdateEvent event)
|
||||
{
|
||||
@ -63,18 +64,18 @@ public class HubVisibilityManager extends MiniPlugin
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
boolean hideMe = Manager.GetTutorial().InTutorial(player) ||
|
||||
UtilMath.offset2d(player.getLocation(), Manager.GetSpawn()) == 0 ||
|
||||
Manager.getPreferences().Get(player).Invisibility ||
|
||||
_hiddenPlayers.contains(player);
|
||||
|
||||
UtilMath.offset2d(player.getLocation(), Manager.GetSpawn()) == 0 ||
|
||||
Manager.getPreferences().Get(player).Invisibility ||
|
||||
_hiddenPlayers.contains(player);
|
||||
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
{
|
||||
if (player.equals(other))
|
||||
continue;
|
||||
|
||||
if (hideMe ||
|
||||
!Manager.getPreferences().Get(other).ShowPlayers ||
|
||||
Manager.GetTutorial().InTutorial(other))
|
||||
!Manager.getPreferences().Get(other).ShowPlayers ||
|
||||
Manager.GetTutorial().InTutorial(other))
|
||||
{
|
||||
VisibilityManager.Instance.setVisibility(player, false, other);
|
||||
}
|
||||
@ -85,22 +86,22 @@ public class HubVisibilityManager extends MiniPlugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void ParticleSwap(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
||||
if (!player.isOp())
|
||||
return;
|
||||
|
||||
|
||||
if (!UtilGear.isMat(player.getItemInHand(), Material.GOLD_NUGGET))
|
||||
return;
|
||||
|
||||
|
||||
int past = 0;
|
||||
if (_particle.containsKey(player))
|
||||
past = _particle.get(player);
|
||||
|
||||
|
||||
if (UtilEvent.isAction(event, ActionType.R))
|
||||
{
|
||||
past = (past+1)%ParticleType.values().length;
|
||||
@ -111,24 +112,24 @@ public class HubVisibilityManager extends MiniPlugin
|
||||
if (past < 0)
|
||||
past = ParticleType.values().length - 1;
|
||||
}
|
||||
|
||||
|
||||
_particle.put(player, past);
|
||||
|
||||
|
||||
player.sendMessage("Particle: " + ParticleType.values()[past]);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Particles(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
|
||||
for (Player player : _particle.keySet())
|
||||
{
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
{
|
||||
UtilParticle.PlayParticle(other, ParticleType.values()[_particle.get(player)], player.getLocation().add(1, 1, 0), 0f, 0f, 0f, 0, 1);
|
||||
}
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.values()[_particle.get(player)], player.getLocation().add(1, 1, 0), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,8 +97,8 @@ public class TextManager extends MiniPlugin
|
||||
UtilBlockText.MakeText("SUPER SMASH MOBS", locClassics.clone().add(0, 14, -15), faceOther, 159, (byte)4, TextAlign.CENTER);
|
||||
UtilBlockText.MakeText("SUPER SMASH MOBS", locClassics.clone().add(0, 14, -16), faceOther, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
|
||||
|
||||
UtilBlockText.MakeText("MINE STRIKE", locClassics.clone().add(0, 21, -15), faceOther, 159, (byte)1, TextAlign.CENTER);
|
||||
UtilBlockText.MakeText("MINE STRIKE", locClassics.clone().add(0, 21, -16), faceOther, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
|
||||
UtilBlockText.MakeText("MASTER BUILDERS", locClassics.clone().add(0, 21, -15), faceOther, 159, (byte)1, TextAlign.CENTER);
|
||||
UtilBlockText.MakeText("MASTER BUILDERS", locClassics.clone().add(0, 21, -16), faceOther, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
|
||||
|
||||
UtilBlockText.MakeText("BLOCK HUNT", locClassics.clone().add(0, 28, -15), faceOther, 159, (byte)14, TextAlign.CENTER);
|
||||
UtilBlockText.MakeText("BLOCK HUNT", locClassics.clone().add(0, 28, -16), faceOther, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
|
||||
|
@ -76,6 +76,7 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
private NautHashMap<String, HashSet<ServerInfo>> _serverKeyInfoMap = new NautHashMap<String, HashSet<ServerInfo>>();
|
||||
private NautHashMap<String, String> _serverKeyTagMap = new NautHashMap<String, String>();
|
||||
private NautHashMap<String, Integer> _serverPlayerCounts = new NautHashMap<String, Integer>();
|
||||
private NautHashMap<String, ServerNpcShop> _serverNpcShopMap = new NautHashMap<String, ServerNpcShop>();
|
||||
private NautHashMap<String, ServerInfo> _serverInfoMap = new NautHashMap<String, ServerInfo>();
|
||||
private NautHashMap<String, Long> _serverUpdate = new NautHashMap<String, Long>();
|
||||
@ -411,6 +412,8 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
public void run(Collection<MinecraftServer> serverStatusList)
|
||||
{
|
||||
_serverPlayerCounts.clear();
|
||||
|
||||
for (MinecraftServer serverStatus : serverStatusList)
|
||||
{
|
||||
if (!_serverInfoMap.containsKey(serverStatus.getName()))
|
||||
@ -451,6 +454,11 @@ public class ServerManager extends MiniPlugin
|
||||
if (_serverKeyTagMap.containsKey(tag))
|
||||
{
|
||||
_serverKeyInfoMap.get(_serverKeyTagMap.get(tag)).add(serverInfo);
|
||||
|
||||
if (!_serverPlayerCounts.containsKey(tag))
|
||||
_serverPlayerCounts.put(tag, 0);
|
||||
|
||||
_serverPlayerCounts.put(tag, _serverPlayerCounts.get(tag) + serverInfo.CurrentPlayers);
|
||||
}
|
||||
}
|
||||
|
||||
@ -749,4 +757,17 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
return _serverNpcShopMap.get("Wizards");
|
||||
}
|
||||
|
||||
public int getGroupTagPlayerCount(String tag)
|
||||
{
|
||||
if (_serverPlayerCounts.containsKey(tag))
|
||||
return _serverPlayerCounts.get(tag);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
public ShopBase<ServerManager> getBuildShop()
|
||||
{
|
||||
return _serverNpcShopMap.get("Master Builders");
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import mineplex.hub.server.ServerManager;
|
||||
import mineplex.hub.server.ui.button.SelectBHButton;
|
||||
import mineplex.hub.server.ui.button.SelectBLDButton;
|
||||
import mineplex.hub.server.ui.button.SelectBRButton;
|
||||
import mineplex.hub.server.ui.button.SelectCSButton;
|
||||
import mineplex.hub.server.ui.button.SelectDMTButton;
|
||||
@ -48,82 +49,110 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
this.setItem(0, ItemStackFactory.Instance.CreateStack(Material.IRON_PICKAXE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "The Bridges " + C.cGray + "4 Team Survival", new String[]
|
||||
setItem(0, ItemStackFactory.Instance.CreateStack(Material.IRON_PICKAXE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "The Bridges " + C.cGray + "4 Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "4 Teams get 10 minutes to prepare.",
|
||||
ChatColor.RESET + "Then the bridges drop, and all hell",
|
||||
ChatColor.RESET + "breaks loose as you battle to the",
|
||||
ChatColor.RESET + "death with the other teams.",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BR") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(2, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Last Man Standing", new String[]
|
||||
setItem(2, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Last Man Standing", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Search for chests to find loot and ",
|
||||
ChatColor.RESET + "fight others to be the last man standing. ",
|
||||
ChatColor.RESET + "Beware of the deep freeze!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("HG") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(4, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Mine-Strike " + C.cGray + "Team Survival", new String[]
|
||||
setItem(4, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Mine-Strike " + C.cGray + "Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "One team must defend two bomb sites from",
|
||||
ChatColor.RESET + "the other team, who are trying to plant a bomb",
|
||||
ChatColor.RESET + "and blow them up!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("MS") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(6, _superSmashCycle.get(_ssmIndex));
|
||||
setItem(6, _superSmashCycle.get(_ssmIndex));
|
||||
|
||||
this.setItem(8, ItemStackFactory.Instance.CreateStack(Material.BLAZE_ROD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Wizards " + C.cGray + "Last Man Standing", new String[]
|
||||
setItem(8, ItemStackFactory.Instance.CreateStack(Material.BLAZE_ROD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Wizards " + C.cGray + "Last Man Standing", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Wield powerful spells to fight",
|
||||
ChatColor.RESET + "against other players in this",
|
||||
ChatColor.RESET + "exciting free-for-all brawl!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("WIZ") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(18, ItemStackFactory.Instance.CreateStack(Material.BOOK_AND_QUILL.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Draw My Thing " + C.cGray + "Pictionary!", new String[]
|
||||
setItem(18, ItemStackFactory.Instance.CreateStack(Material.BOOK_AND_QUILL.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Draw My Thing " + C.cGray + "Pictionary!", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Players take turns at drawing a random",
|
||||
ChatColor.RESET + "word. Whoever guesses it within the time",
|
||||
ChatColor.RESET + "limit gets some points!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("DMT") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(20, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_CHESTPLATE, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Castle Siege " + C.cGray + "Team Game", new String[]
|
||||
setItem(20, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_CHESTPLATE, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Castle Siege " + C.cGray + "Team Game", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Defenders must protect King Sparklez",
|
||||
ChatColor.RESET + "from the endless waves of Undead",
|
||||
ChatColor.RESET + "until the sun rises!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("CS") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(22, ItemStackFactory.Instance.CreateStack(Material.BEACON.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Dominate " + C.cGray + "Team Game", new String[]
|
||||
setItem(22, ItemStackFactory.Instance.CreateStack(Material.BEACON.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Dominate " + C.cGray + "Team Game", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Customize one of five exciting champions",
|
||||
ChatColor.RESET + "and battle with the opposing team for the",
|
||||
ChatColor.RESET + "control points on the map.",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("DOM") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(24, ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Team Deathmatch " + C.cGray + "Team Game", new String[]
|
||||
setItem(24, ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Team Deathmatch " + C.cGray + "Team Game", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Customize one of five exciting champions",
|
||||
ChatColor.RESET + "and battle with the opposing team to the",
|
||||
ChatColor.RESET + "last man standing.",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("TDM") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(26, ItemStackFactory.Instance.CreateStack(Material.GRASS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Block Hunt " + C.cGray + "Cat and Mouse", new String[]
|
||||
setItem(26, ItemStackFactory.Instance.CreateStack(Material.GRASS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Block Hunt " + C.cGray + "Cat and Mouse", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Hide as blocks/animals, upgrade your ",
|
||||
ChatColor.RESET + "weapon and fight to survive against",
|
||||
ChatColor.RESET + "the Hunters!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BH") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
this.setItem(40, _minigameCycle.get(_minigameIndex));
|
||||
setItem(36, ItemStackFactory.Instance.CreateStack(Material.WOOD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Master Builders " + C.cGray + "Creative Build", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Players are given a Build Theme and ",
|
||||
ChatColor.RESET + "must use blocks, monsters and more",
|
||||
ChatColor.RESET + "to create a masterpiece!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BLD") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(44, _minigameCycle.get(_minigameIndex));
|
||||
|
||||
getButtonMap().put(0, new SelectBRButton(this));
|
||||
getButtonMap().put(2, new SelectSGButton(this));
|
||||
@ -136,12 +165,25 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
getButtonMap().put(22, new SelectDOMButton(this));
|
||||
getButtonMap().put(24, new SelectTDMButton(this));
|
||||
getButtonMap().put(26, new SelectBHButton(this));
|
||||
getButtonMap().put(40, new SelectMINButton(this));
|
||||
getButtonMap().put(36, new SelectBLDButton(this));
|
||||
getButtonMap().put(44, new SelectMINButton(this));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void createMinigameCycle()
|
||||
{
|
||||
int playerCount = getPlugin().getGroupTagPlayerCount("MIN") +
|
||||
getPlugin().getGroupTagPlayerCount("DR") +
|
||||
getPlugin().getGroupTagPlayerCount("DE") +
|
||||
getPlugin().getGroupTagPlayerCount("PB") +
|
||||
getPlugin().getGroupTagPlayerCount("TF") +
|
||||
getPlugin().getGroupTagPlayerCount("RUN") +
|
||||
getPlugin().getGroupTagPlayerCount("SN") +
|
||||
getPlugin().getGroupTagPlayerCount("DT") +
|
||||
getPlugin().getGroupTagPlayerCount("SQ") +
|
||||
getPlugin().getGroupTagPlayerCount("SA") +
|
||||
getPlugin().getGroupTagPlayerCount("SS") +
|
||||
getPlugin().getGroupTagPlayerCount("OITQ");
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(98, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
@ -158,6 +200,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.GOLD_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -175,7 +219,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl"
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(122, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -194,6 +240,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -212,6 +260,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.LEATHER_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -230,6 +280,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -248,6 +300,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -266,6 +320,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BARDING.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -284,6 +340,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(159, (byte)14, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -302,6 +360,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(309, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -320,6 +380,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(319, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
@ -338,6 +400,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
}
|
||||
|
||||
@ -349,6 +413,8 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Pick from a selection of monsters,",
|
||||
ChatColor.RESET + "then battle other players to the ",
|
||||
ChatColor.RESET + "death with your monsters skills!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SSM") + ChatColor.RESET + " other players!",
|
||||
};
|
||||
|
||||
_superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs", desc));
|
||||
@ -422,4 +488,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
{
|
||||
getPlugin().getWizardShop().attemptShopOpen(player);
|
||||
}
|
||||
|
||||
public void OpenBLD(Player player)
|
||||
{
|
||||
getPlugin().getBuildShop().attemptShopOpen(player);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package mineplex.hub.server.ui.button;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.hub.server.ui.ServerGameMenu;
|
||||
|
||||
public class SelectBLDButton implements IButton
|
||||
{
|
||||
private ServerGameMenu _menu;
|
||||
|
||||
public SelectBLDButton(ServerGameMenu menu)
|
||||
{
|
||||
_menu = menu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_menu.OpenBLD(player);
|
||||
}
|
||||
}
|
@ -19,9 +19,11 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
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.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -124,7 +126,8 @@ public class Blink extends SkillActive
|
||||
curRange += 0.2;
|
||||
|
||||
//Smoke Trail
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
lastSmoke = newTarget.getBlock();
|
||||
}
|
||||
@ -180,7 +183,8 @@ public class Blink extends SkillActive
|
||||
curRange += 0.2;
|
||||
|
||||
//Smoke Trail
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
lastSmoke = newTarget.getBlock();
|
||||
|
||||
|
@ -23,7 +23,9 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -155,7 +157,8 @@ public class Evade extends SkillActive
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, damagee.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
//Action
|
||||
damagee.teleport(target);
|
||||
|
@ -20,7 +20,9 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -132,7 +134,8 @@ public class Flash extends SkillActive
|
||||
curRange += 0.2;
|
||||
|
||||
//Smoke Trail
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Modify Range
|
||||
|
@ -33,6 +33,7 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.disguise.disguises.DisguisePig;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
@ -204,7 +205,8 @@ public class Illusion extends SkillActive
|
||||
}
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, skel.getLocation().add(0, 1, 0), 0.3f, 0.3f, 0.3f, 0.06f, 30);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, skel.getLocation().add(0, 1, 0), 0.3f, 0.3f, 0.3f, 0.06f, 30,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
for (int i=0 ; i<2 ; i++)
|
||||
skel.getWorld().playSound(skel.getLocation(), Sound.FIZZ, 2f, 0.4f);
|
||||
|
@ -25,7 +25,9 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -177,7 +179,8 @@ public class MarkedForDeath extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.MOB_SPELL, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.MOB_SPELL, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,9 @@ import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
@ -93,7 +95,8 @@ public class Recall extends Skill
|
||||
|
||||
while (UtilMath.offset(current, target) > 0.5)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, current, 0, 1f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, current, 0, 1f, 0, 0, 1,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
current = current.add(UtilAlg.getTrajectory(current, target).multiply(0.1));
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,10 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -109,7 +111,8 @@ public class RecallOld extends Skill
|
||||
player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, 133);
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f);
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
//Return
|
||||
Item item = _items.remove(player);
|
||||
@ -122,7 +125,8 @@ public class RecallOld extends Skill
|
||||
//Effect
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f);
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
Reset(player);
|
||||
|
||||
|
@ -24,7 +24,9 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -153,7 +155,8 @@ public class SilencingArrow extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SPELL, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.SPELL, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,9 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -140,7 +142,8 @@ public class SmokeArrow extends SkillActive
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, projectile.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, projectile.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
//Remove
|
||||
projectile.remove();
|
||||
@ -154,7 +157,8 @@ public class SmokeArrow extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.core.condition.Condition;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
@ -82,7 +84,8 @@ public class SmokeBomb extends Skill
|
||||
Factory.Condition().Factory().Cloak(GetName(), player, player, 1 + 2 * level, false, true);
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, player.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, player.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
for (Player other : UtilPlayer.getNearby(player.getLocation(), 2 + level))
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -113,7 +114,8 @@ public class Stealth extends Skill
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
public void Remove(Player player, LivingEntity source)
|
||||
@ -128,7 +130,8 @@ public class Stealth extends Skill
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
@ -135,7 +136,8 @@ public class Bloodlust extends Skill
|
||||
for (Entity ent : _str.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _str.get(ent) * 2);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _str.get(ent) * 2,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillEvent;
|
||||
@ -120,7 +121,8 @@ public class Stampede extends Skill
|
||||
for (Entity ent : _sprintStr.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _sprintStr.get(ent) * 2);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _sprintStr.get(ent) * 2,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,10 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -195,7 +197,8 @@ public class Takedown extends SkillActive
|
||||
for (Entity ent : _live.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 4);
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 4,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,10 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -121,7 +123,8 @@ public class Taunt extends SkillActive
|
||||
for (Entity ent : _live.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, ent.getLocation().add(0, 2, 0),
|
||||
0, 0, 0, 6f, 8);
|
||||
0, 0, 0, 6f, 8,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,9 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -109,12 +111,14 @@ public class WhirlwindAxe extends SkillActive
|
||||
double x = Math.sin(j + (ticksLived/50d)) * (j%(Math.PI/2d)) * 3;
|
||||
double z = Math.cos(j + (ticksLived/50d)) * (j%(Math.PI/2d)) * 3;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, loc.clone().add(x, 1, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, loc.clone().add(x, 1, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
x = Math.sin(j + (ticksLived/50d) + Math.PI/4) * (j%(Math.PI/2d)) * 3;
|
||||
z = Math.cos(j + (ticksLived/50d) + Math.PI/4) * (j%(Math.PI/2d)) * 3;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, loc.clone().add(x, 1, z), 0f, 0f, 0f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, loc.clone().add(x, 1, z), 0f, 0f, 0f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.STEP_WOOL, 2f, 1f + (float)((j%(Math.PI/2d))/(Math.PI/2)));
|
||||
|
@ -18,7 +18,9 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -129,7 +131,8 @@ public class BullsCharge extends SkillActive
|
||||
{
|
||||
if (player.hasPotionEffect(PotionEffectType.SPEED))
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,10 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -107,7 +109,8 @@ public class Fortitude extends Skill
|
||||
UtilPlayer.health(entry.getKey(), toHeal);
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, entry.getKey().getEyeLocation(), 0, 0.2f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, entry.getKey().getEyeLocation(), 0, 0.2f, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
//Finished
|
||||
if (entry.getValue() <= 0)
|
||||
|
@ -15,7 +15,9 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.core.condition.Condition;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -114,7 +116,8 @@ public class HoldPosition extends SkillActive
|
||||
continue;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.MOB_SPELL, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3 + getLevel(player));
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3 + getLevel(player),
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,9 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -66,8 +68,10 @@ public class ShieldSmash extends SkillActive
|
||||
loc.add(0, 0.8, 0);
|
||||
|
||||
//Particle
|
||||
UtilParticle.PlayParticle(ParticleType.CLOUD, loc, 0, 0, 0, 0.05f, 6);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, loc, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CLOUD, loc, 0, 0, 0, 0.05f, 6,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, loc, 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
boolean hit = false;
|
||||
|
||||
|
@ -26,6 +26,7 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -267,7 +268,8 @@ public class ArcticArmor extends Skill
|
||||
for (Entity ent : _active)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, ent.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, 3);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, 3,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,9 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -34,7 +36,8 @@ public class LifeBondsData
|
||||
}
|
||||
|
||||
_loc.add(UtilAlg.getTrajectory(_loc, _target.getLocation().add(0, 0.8, 0)).multiply(0.9));
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, _loc, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, _loc, 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -11,7 +11,9 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillChargeSword;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -93,13 +95,15 @@ public class StaticLazer extends SkillChargeSword
|
||||
curRange += 0.2;
|
||||
|
||||
//Smoke Trail
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, newTarget, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, newTarget, 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Destination
|
||||
Location target = player.getLocation().add(player.getLocation().getDirection().multiply(curRange));
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.EXPLODE, target, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.EXPLODE, target, 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
//Firework
|
||||
UtilFirework.playFirework(player.getLocation().add(player.getLocation().getDirection().multiply(Math.max(0, curRange - 0.6))), Type.BURST, Color.WHITE, false, false);
|
||||
|
@ -16,11 +16,13 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -148,7 +150,8 @@ public class Agility extends SkillActive
|
||||
{
|
||||
if (player.isSprinting())
|
||||
UtilParticle.PlayParticle(ParticleType.SPELL, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,9 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillChargeBow;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -81,7 +83,8 @@ public class Barrage extends SkillChargeBow
|
||||
_arrows.add(arrow);
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.SHOOT_ARROW, 1f, 1f);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, arrow.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, arrow.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,10 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -126,7 +128,8 @@ public class Disengage extends SkillActive
|
||||
|
||||
//Effect
|
||||
damagee.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 0.5f, 1.6f);
|
||||
UtilParticle.PlayParticle(ParticleType.ANGRY_VILLAGER, damager.getEyeLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.ANGRY_VILLAGER, damager.getEyeLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(damagee, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
|
||||
|
@ -5,6 +5,7 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -24,10 +25,12 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -232,7 +235,8 @@ public class ExplosiveShot extends SkillActive
|
||||
UtilPlayer.message((Player)cur, F.main(GetClassType().name(), F.name(player.getName()) +" hit you with " + F.skill(GetName(level)) + "."));
|
||||
}
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, loc, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, loc, 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
loc.getWorld().playSound(loc, Sound.EXPLODE, 2f, 0.75f);
|
||||
}
|
||||
|
||||
@ -243,7 +247,8 @@ public class ExplosiveShot extends SkillActive
|
||||
return;
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,7 +28,9 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -170,7 +172,9 @@ public class HealingShot extends SkillActive
|
||||
"You hit " + F.name(UtilEnt.getName(damagee)) +" with " + F.skill(GetName(level)) + "."));
|
||||
|
||||
//Particles
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, damagee.getLocation(), (float)(Math.random() - 0.5), (float)(Math.random() + 0.5), (float)(Math.random() - 0.5), 2f, 12);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, damagee.getLocation(),
|
||||
(float)(Math.random() - 0.5), (float)(Math.random() + 0.5), (float)(Math.random() - 0.5), 2f, 12,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
//Remove
|
||||
projectile.remove();
|
||||
@ -184,7 +188,8 @@ public class HealingShot extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,9 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -110,7 +112,8 @@ public class HeavyArrows extends Skill
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,12 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -146,7 +148,8 @@ public class IncendiaryShot extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,11 +22,13 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -147,7 +149,8 @@ public class NapalmShot extends SkillActive
|
||||
|
||||
for (Entity ent : _arrows)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,9 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillChargeBow;
|
||||
@ -93,7 +95,8 @@ public class Overcharge extends SkillChargeBow
|
||||
|
||||
for (Entity ent : _arrows.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,10 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -46,7 +48,8 @@ public class VitalitySpores extends Skill
|
||||
//Factory.Condition().Factory().Regen(GetName(), cur, cur, 3.9 + 2*level, 0, false, true, true);
|
||||
UtilPlayer.health(cur, 1);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation().add(UtilAlg.getBehind(cur.getLocation().getDirection().multiply(0.5))), 0, 0.2f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation().add(UtilAlg.getBehind(cur.getLocation().getDirection().multiply(0.5))), 0, 0.2f, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,13 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
@ -197,7 +199,8 @@ public class WolfsFury extends SkillActive
|
||||
for (Player player : _active.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation(),
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4);
|
||||
(float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,10 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||
import mineplex.minecraft.game.classcombat.item.ItemUsable;
|
||||
|
||||
@ -139,7 +141,8 @@ public class ProximityExplosive extends ItemUsable
|
||||
//Effect
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.NOTE_PLING, 0.5f, 0.5f);
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.EXPLODE, 4f, 0.8f);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, ent.getLocation(), 0, 0.5f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, ent.getLocation(), 0, 0.5f, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -24,7 +24,9 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||
@ -132,7 +134,8 @@ public class ProximityZapper extends ItemUsable
|
||||
|
||||
//Effect
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.NOTE_PLING, 0.5f, 0.5f);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation(), 0, 0.5f, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation(), 0, 0.5f, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -255,6 +255,8 @@ public abstract class Game implements Listener
|
||||
public boolean CanAddStats = true;
|
||||
public boolean CanGiveLoot = true;
|
||||
|
||||
public boolean VersionRequire1_8 = false;
|
||||
|
||||
public ArrayList<String> GemBoosters = new ArrayList<String>();
|
||||
private final Set<StatTracker<? extends Game>> _statTrackers = new HashSet<>();
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package nautilus.game.arcade.game.games.build;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
@ -12,6 +15,7 @@ import org.bukkit.entity.Boat;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.entity.Painting;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -29,6 +33,8 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
@ -58,6 +64,7 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
@ -78,42 +85,62 @@ import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.games.build.gui.MobShop;
|
||||
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
||||
import nautilus.game.arcade.game.games.draw.kits.*;
|
||||
import nautilus.game.arcade.game.games.build.kits.KitBuilder;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
public class Build extends SoloGame
|
||||
public class Build extends SoloGame
|
||||
{
|
||||
private NautHashMap<Player, BuildData> _data = new NautHashMap<Player, BuildData>();
|
||||
|
||||
private ArrayList<Entry<Player,Double>> _scoreboardPlaces = new ArrayList<Entry<Player,Double>>();
|
||||
|
||||
private int _buildGameState = 0;
|
||||
private long _buildStateTime = 0;
|
||||
private long _buildTime = 300000;
|
||||
private long _voteTime = 12000;
|
||||
private long _viewTime = 16000;
|
||||
private BuildData _viewData = null;
|
||||
|
||||
private int _countdownTimerState = 0;
|
||||
|
||||
private String[] _words;
|
||||
|
||||
private String _word = "?";
|
||||
|
||||
private OptionsShop _shop;
|
||||
private OptionsShop _optionsShop;
|
||||
private MobShop _mobShop;
|
||||
private ItemStack _shopItem;
|
||||
|
||||
|
||||
private String[] _hintText = new String[]
|
||||
{
|
||||
"Click Creatures to change their settings!",
|
||||
"Set the Time/Weather in the Options Menu!",
|
||||
"Vote based upon Effort, Creativity and Quality!",
|
||||
"Create Particles in the Options Menu!",
|
||||
"Vote fairly for other players! It's more fun!",
|
||||
|
||||
};
|
||||
|
||||
private int _hintIndex = 0;
|
||||
private long _hintTimer = 0;
|
||||
private ChatColor _hintColor = ChatColor.YELLOW;
|
||||
private ChatColor _firstHintColor = ChatColor.YELLOW;
|
||||
|
||||
public Build(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Build,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new KitSlowAndSteady(manager),
|
||||
new KitSelector(manager),
|
||||
new KitTools(manager),
|
||||
new KitBuilder(manager),
|
||||
},
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Build the word!",
|
||||
"Be creative and build something",
|
||||
"based on the build theme!"
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
@ -134,13 +161,17 @@ public class Build extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
|
||||
this.CreatureAllow = true;
|
||||
|
||||
this.WorldFireSpread = true;
|
||||
|
||||
_words = new String[]
|
||||
{
|
||||
"Pirate Ship", "Mineshaft", "Archers Tower", "Dinner Table", "Pokemon"
|
||||
"Rollercoaster", "Archery Range", "Pokemon", "Pirates", "Vikings", "Dinosaur", "Dragon", "Toilet", "Farm", "Tree House", "Burger", "Cat", "Truck", "Bicycle", "Soda", "Music Instrument", "Statue", "Cannon", "Catapult", "Sailing Boat", "Grim Reaper", "Star Wars", "Elephant", "Penguin", "Ninja", "Pot of Gold", "Shrek", "Fruit", "Breakfast", "Toaster", "Robot", "Camping", "Rocket", "Aliens", "Shipwreck", "Cannibals", "Flying Creature", "Beach Creature", "Sea Creature", "Spongebob", "Car", "Pot Plant", "Weapons", "Christmas", "King", "Queen", "Angel", "Demon", "Halloween", "Tank", "Aeroplane"
|
||||
|
||||
};
|
||||
|
||||
_shop = new OptionsShop(this, getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
|
||||
_mobShop = new MobShop(getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
|
||||
_optionsShop = new OptionsShop(this, getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
|
||||
_shopItem = ItemStackFactory.Instance.CreateStack(Material.DIAMOND, (byte) 0, 1, C.cGreen + "Options");
|
||||
}
|
||||
|
||||
@ -179,6 +210,8 @@ public class Build extends SoloGame
|
||||
_word = _words[UtilMath.r(_words.length)];
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "Build " + C.cWhite + _word, 0, 80, 5);
|
||||
|
||||
this.WorldTimeSet = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,6 +227,62 @@ public class Build extends SoloGame
|
||||
//Game
|
||||
if (_buildGameState == 0)
|
||||
{
|
||||
if (_countdownTimerState == 0 && UtilTime.elapsed(GetStateTime(), 60000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "4 Minutes Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 1 && UtilTime.elapsed(GetStateTime(), 120000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "3 Minutes Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 2 && UtilTime.elapsed(GetStateTime(), 180000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "2 Minutes Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 3 && UtilTime.elapsed(GetStateTime(), 240000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "1 Minute Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 4 && UtilTime.elapsed(GetStateTime(), 270000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "30 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 5 && UtilTime.elapsed(GetStateTime(), 285000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "15 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 6 && UtilTime.elapsed(GetStateTime(), 295000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "5 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 7 && UtilTime.elapsed(GetStateTime(), 296000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "4 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 8 && UtilTime.elapsed(GetStateTime(), 297000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "3 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 9 && UtilTime.elapsed(GetStateTime(), 298000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "2 Seconds Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
else if (_countdownTimerState == 10 && UtilTime.elapsed(GetStateTime(), 299000))
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cYellow + "1 Second Remaining", 0, 60, 5);
|
||||
_countdownTimerState++;
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() - GetStateTime() > _buildTime)
|
||||
{
|
||||
_buildGameState++;
|
||||
@ -202,13 +291,19 @@ public class Build extends SoloGame
|
||||
//Flags
|
||||
this.BlockBreak = false;
|
||||
this.BlockPlace = false;
|
||||
|
||||
this.ItemDrop = false;
|
||||
this.ItemPickup = false;
|
||||
|
||||
this.InventoryClick = false;
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "Time Up!", 0, 60, 5);
|
||||
UtilTextMiddle.display(null, C.cYellow + "TIME IS UP!", 0, 60, 5);
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
player.getInventory().clear(8);
|
||||
player.closeInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
//Pause
|
||||
@ -224,8 +319,8 @@ public class Build extends SoloGame
|
||||
else if (_buildGameState == 2)
|
||||
{
|
||||
//End Vote Time
|
||||
if (_viewData != null && (UtilTime.elapsed(_buildStateTime, _voteTime) ||
|
||||
_viewData.Score.size() == GetPlayers(true).size() - 1)) //All votes cast
|
||||
if (_viewData != null && (UtilTime.elapsed(_buildStateTime, _voteTime)))
|
||||
//_viewData.Score.size() == GetPlayers(true).size() - 1)) //All votes cast
|
||||
{
|
||||
for (Player player : GetPlayers(true))
|
||||
UtilInv.Clear(player);
|
||||
@ -241,7 +336,8 @@ public class Build extends SoloGame
|
||||
|
||||
//Effects
|
||||
_viewData.Spawn.getWorld().playSound(_viewData.Spawn, Sound.EXPLODE, 3f, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, _viewData.Spawn, 4f, 4f, 4f, 0, 10);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, _viewData.Spawn, 4f, 4f, 4f, 0, 10,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Announce Builder
|
||||
@ -292,10 +388,10 @@ public class Build extends SoloGame
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)5, 1, C.Bold + "+3 " + C.cGreen + C.Bold + "Good"));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)3, 1, C.Bold + "+4 " + C.cAqua + C.Bold + "Amazing"));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(160, (byte)10, 1, C.Bold + "+5 " + C.cPurple + C.Bold + "WOW! EVERYTHING IS AWESOME!"));
|
||||
}
|
||||
|
||||
//Text
|
||||
UtilTextMiddle.display(null, C.cYellow + "Cast Your Vote!", 0, 60, 5);
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "Click to Vote", 0, 60, 5, player);
|
||||
}
|
||||
|
||||
|
||||
_buildStateTime = System.currentTimeMillis();
|
||||
}
|
||||
@ -341,15 +437,18 @@ public class Build extends SoloGame
|
||||
if (first)
|
||||
{
|
||||
teleportPlayers(data);
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
||||
//Only count if they got above TERRIBLE score
|
||||
if (BuildQuality.getQuality(bestScore) != BuildQuality.Failure)
|
||||
places.add(bestPlayer);
|
||||
|
||||
_scoreboardPlaces.add(new AbstractMap.SimpleEntry<Player, Double>(bestPlayer, bestScore));
|
||||
}
|
||||
|
||||
writeScoreboard();
|
||||
|
||||
//Announce
|
||||
AnnounceEnd(places);
|
||||
|
||||
@ -372,6 +471,11 @@ public class Build extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isBuildTime()
|
||||
{
|
||||
return _buildStateTime == 0;
|
||||
}
|
||||
|
||||
private void teleportPlayers(BuildData data)
|
||||
{
|
||||
//Teleport
|
||||
@ -663,6 +767,9 @@ public class Build extends SoloGame
|
||||
@EventHandler
|
||||
public void itemDrop(PlayerDropItemEvent event)
|
||||
{
|
||||
if (_buildGameState != 0)
|
||||
return;
|
||||
|
||||
BuildData data = _data.get(event.getPlayer());
|
||||
|
||||
if (data == null)
|
||||
@ -677,6 +784,9 @@ public class Build extends SoloGame
|
||||
@EventHandler
|
||||
public void itemPickup(PlayerPickupItemEvent event)
|
||||
{
|
||||
if (_buildGameState != 0)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
BuildData data = _data.get(event.getPlayer());
|
||||
@ -687,7 +797,8 @@ public class Build extends SoloGame
|
||||
if (data.Player.equals(event.getPlayer()))
|
||||
{
|
||||
event.getItem().remove();
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, event.getItem().getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, event.getItem().getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@ -781,17 +892,6 @@ public class Build extends SoloGame
|
||||
data.removeEntity(event.GetDamageeEntity());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void entKill(PlayerInteractEntityEvent event)
|
||||
{
|
||||
BuildData data = _data.get(event.getPlayer());
|
||||
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
data.removeEntity(event.getRightClicked());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void vehicleSpawn(VehicleCreateEvent event)
|
||||
{
|
||||
@ -872,6 +972,13 @@ public class Build extends SoloGame
|
||||
data.removeEntity(event.getVehicle());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void fireAllow(BlockIgniteEvent event)
|
||||
{
|
||||
if (event.getCause() != IgniteCause.FLINT_AND_STEEL && event.getCause() != IgniteCause.FIREBALL)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler
|
||||
public void ScoreboardUpdate(UpdateEvent event)
|
||||
@ -882,6 +989,11 @@ public class Build extends SoloGame
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
writeScoreboard();
|
||||
}
|
||||
|
||||
public void writeScoreboard()
|
||||
{
|
||||
//Wipe Last
|
||||
Scoreboard.Reset();
|
||||
|
||||
@ -902,22 +1014,27 @@ public class Build extends SoloGame
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Vote Time");
|
||||
Scoreboard.Write(UtilTime.MakeStr(Math.max(0, _voteTime - (System.currentTimeMillis() - _buildStateTime)), 1));
|
||||
|
||||
if (_viewData != null)
|
||||
// if (_viewData != null)
|
||||
// {
|
||||
// Scoreboard.WriteBlank();
|
||||
// Scoreboard.Write(C.cYellow + C.Bold + "Votes " + ChatColor.RESET + _viewData.Score.size() + " / " + (GetPlayers(true).size()-1));
|
||||
// Scoreboard.Write(C.cYellow + C.Bold + "Avg " + ChatColor.RESET + UtilMath.trim(2, _viewData.getScore()) + "");
|
||||
// Scoreboard.Write(C.cYellow + C.Bold + "Rating " + ChatColor.RESET + BuildQuality.getQuality(_viewData.getScore()) + "");
|
||||
// Scoreboard.WriteBlank();
|
||||
//
|
||||
// for (Player player : _viewData.Score.keySet())
|
||||
// {
|
||||
// Scoreboard.Write("+" + _viewData.Score.get(player) + " " + player.getName());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if (_buildGameState == 4)
|
||||
{
|
||||
for (Entry<Player, Double> score : _scoreboardPlaces)
|
||||
{
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Debug Voted");
|
||||
Scoreboard.Write(_viewData.Score.size() + " / " + (GetPlayers(true).size()-1));
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Debug Avg");
|
||||
Scoreboard.Write(UtilMath.trim(2, _viewData.getScore()) + "");
|
||||
int percent = (int)(score.getValue() * 20);
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Debug Rating");
|
||||
Scoreboard.Write(BuildQuality.getQuality(_viewData.getScore()) + "");
|
||||
Scoreboard.Write(BuildQuality.getQuality(score.getValue()).getColor() + percent + "% " + ChatColor.RESET + score.getKey().getName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -936,7 +1053,7 @@ public class Build extends SoloGame
|
||||
public void openShop(PlayerInteractEvent event)
|
||||
{
|
||||
if (IsAlive(event.getPlayer()) && _shopItem.equals(event.getPlayer().getItemInHand()))
|
||||
_shop.attemptShopOpen(event.getPlayer());
|
||||
_optionsShop.attemptShopOpen(event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -1033,13 +1150,13 @@ public class Build extends SoloGame
|
||||
return;
|
||||
|
||||
if (_viewData != null)
|
||||
{
|
||||
{
|
||||
_viewData.playWeather(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (BuildData data : _data.values())
|
||||
{
|
||||
{
|
||||
data.playWeather(false);
|
||||
}
|
||||
}
|
||||
@ -1062,18 +1179,51 @@ public class Build extends SoloGame
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void showOpenInventory(UpdateEvent event)
|
||||
public void showHints(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC) return;
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (_buildGameState != 0)
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
//Hints
|
||||
if (UtilTime.elapsed(_hintTimer, 8000))
|
||||
{
|
||||
if (_hintColor == ChatColor.AQUA)
|
||||
_hintColor = ChatColor.GREEN;
|
||||
else
|
||||
_hintColor = ChatColor.AQUA;
|
||||
|
||||
_hintIndex = (_hintIndex + 1)%_hintText.length;
|
||||
|
||||
_hintTimer = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
boolean showHint = !UtilTime.elapsed(_hintTimer, 1100);
|
||||
|
||||
//Initial
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
BuildData buildData = _data.get(player);
|
||||
if (buildData != null && !buildData.ClickedInventory)
|
||||
{
|
||||
UtilTextBottom.display(C.cYellow + "Open Inventory to get Blocks!", player);
|
||||
UtilTextBottom.display(_firstHintColor + "Open Inventory to get Blocks!", player);
|
||||
}
|
||||
else if (showHint)
|
||||
{
|
||||
UtilTextBottom.display(_hintColor + _hintText[_hintIndex], player);
|
||||
}
|
||||
}
|
||||
|
||||
//Initial Flash
|
||||
if (_firstHintColor == ChatColor.YELLOW)
|
||||
_firstHintColor = ChatColor.GREEN;
|
||||
else
|
||||
_firstHintColor = ChatColor.YELLOW;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
@ -1087,4 +1237,38 @@ public class Build extends SoloGame
|
||||
{
|
||||
event.blockList().clear();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void openMobGui(PlayerInteractEntityEvent event)
|
||||
{
|
||||
if (!IsLive() || !IsAlive(event.getPlayer())) return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
BuildData buildData = _data.get(player);
|
||||
|
||||
if (buildData != null)
|
||||
{
|
||||
for (Entity e : buildData.Entities)
|
||||
{
|
||||
if (e instanceof LivingEntity || e instanceof Minecart || e instanceof Boat)
|
||||
{
|
||||
if (e.equals(event.getRightClicked()))
|
||||
{
|
||||
_mobShop.attemptShopOpen(player, buildData, e);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location GetSpectatorLocation()
|
||||
{
|
||||
if (GetPlayers(true).size() > 0)
|
||||
return UtilAlg.Random(GetPlayers(true)).getLocation().add(0, 1, 0);
|
||||
|
||||
return GetTeamList().get(0).GetSpawn();
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
@ -13,16 +14,22 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import net.minecraft.server.v1_7_R4.EntityLightning;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityWeather;
|
||||
|
||||
public class BuildData
|
||||
{
|
||||
@ -120,6 +127,13 @@ public class BuildData
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity instanceof LivingEntity)
|
||||
{
|
||||
((LivingEntity)entity).setRemoveWhenFarAway(false);
|
||||
((LivingEntity)entity).setCustomName(UtilEnt.getName(entity));
|
||||
|
||||
}
|
||||
|
||||
Entities.add(entity);
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
@ -132,7 +146,8 @@ public class BuildData
|
||||
{
|
||||
entity.remove();
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, entity.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, entity.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +219,8 @@ public class BuildData
|
||||
{
|
||||
entIter.remove();
|
||||
ent.remove();
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
}
|
||||
@ -219,7 +235,8 @@ public class BuildData
|
||||
{
|
||||
itemIter.remove();
|
||||
ent.remove();
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, ent.getLocation().add(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -238,9 +255,11 @@ public class BuildData
|
||||
amount = 1;
|
||||
|
||||
if (all)
|
||||
UtilParticle.PlayParticle(type, loc, 0.4f, 0.4f, 0.4f, 0, amount);
|
||||
UtilParticle.PlayParticle(type, loc, 0.4f, 0.4f, 0.4f, 0, amount,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
else
|
||||
UtilParticle.PlayParticle(Player, type, loc, 0.4f, 0.4f, 0.4f, 0, amount);
|
||||
UtilParticle.PlayParticle(type, loc, 0.4f, 0.4f, 0.4f, 0, amount,
|
||||
ViewDist.LONGER, Player);
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,14 +278,14 @@ public class BuildData
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.setPlayerWeather(type);
|
||||
playWeather(Player, type);
|
||||
}
|
||||
}
|
||||
|
||||
public void playWeather(Player player, org.bukkit.WeatherType type)
|
||||
{
|
||||
player.setPlayerWeather(type);
|
||||
player.setPlayerTime(Time, false);
|
||||
player.setPlayerTime(Time, false);
|
||||
|
||||
if (Weather == WeatherType.STORMING)
|
||||
{
|
||||
@ -275,10 +294,37 @@ public class BuildData
|
||||
|
||||
//Strike Lightning Here
|
||||
if (Math.random() > 0.9)
|
||||
UtilBlock.getHighest(player.getWorld(),
|
||||
(int)(Spawn.getX() + Math.random() * 200 - 100),
|
||||
(int)(Spawn.getX() + Math.random() * 200 - 100));
|
||||
{
|
||||
Location loc = UtilBlock.getHighest(player.getWorld(),
|
||||
(int) (Spawn.getX() + Math.random() * 200 - 100),
|
||||
(int) (Spawn.getX() + Math.random() * 200 - 100)).getLocation();
|
||||
|
||||
EntityLightning entity = new EntityLightning(((CraftWorld) loc.getWorld()).getHandle(), loc.getX(), loc.getY(), loc.getZ(), true);
|
||||
PacketPlayOutSpawnEntityWeather packet = new PacketPlayOutSpawnEntityWeather(entity);
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setGround(GroundData ground)
|
||||
{
|
||||
if (!Recharge.Instance.use(Player, "Change Ground", 2000, true, false))
|
||||
{
|
||||
Player.playSound(Player.getLocation(), Sound.NOTE_BASS_GUITAR, 1f, 0.1f);
|
||||
return;
|
||||
}
|
||||
|
||||
Material mat = ground.getMaterial();
|
||||
byte data = ground.getData();
|
||||
|
||||
if (mat == Material.LAVA_BUCKET) mat = Material.LAVA;
|
||||
else if (mat == Material.WATER_BUCKET) mat = Material.WATER;
|
||||
|
||||
int y = Math.min(CornerA.getBlockY(), CornerB.getBlockY()) - 1;
|
||||
for (int x= Math.min(CornerA.getBlockX(), CornerB.getBlockX()) ; x <= Math.max(CornerA.getBlockX(), CornerB.getBlockX()) ; x++)
|
||||
for (int z= Math.min(CornerA.getBlockZ(), CornerB.getBlockZ()) ; z <= Math.max(CornerA.getBlockZ(), CornerB.getBlockZ()) ; z++)
|
||||
{
|
||||
MapUtil.QuickChangeBlockAt(Player.getWorld(), x, y, z, mat, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.build;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public enum BuildQuality
|
||||
@ -7,7 +9,7 @@ public enum BuildQuality
|
||||
NoVotes(C.cGray + "No Votes"),
|
||||
|
||||
Mindblowing(C.cAqua + "Mindblowing"),
|
||||
Amazing(C.cGreen + "Amazing"),
|
||||
Awesome(C.cGreen + "Awesome"),
|
||||
Good(C.cYellow + "Good"),
|
||||
Satisfactory(C.cGold + "Satisfactory"),
|
||||
Failure(C.cRed + "FAILURE");
|
||||
@ -30,7 +32,12 @@ public enum BuildQuality
|
||||
if (avgScore <= 1) return Failure;
|
||||
if (avgScore <= 2) return Satisfactory;
|
||||
if (avgScore <= 3) return Good;
|
||||
if (avgScore <= 4) return Amazing;
|
||||
if (avgScore <= 4) return Awesome;
|
||||
return Mindblowing;
|
||||
}
|
||||
|
||||
public String getColor()
|
||||
{
|
||||
return ChatColor.getLastColors(_text);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package nautilus.game.arcade.game.games.build;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
public class GroundData
|
||||
{
|
||||
public final Material _material;
|
||||
public final byte _data;
|
||||
|
||||
public GroundData(Material material)
|
||||
{
|
||||
this(material, (byte) 0);
|
||||
}
|
||||
|
||||
public GroundData(Material material, byte data)
|
||||
{
|
||||
_material = material;
|
||||
_data = data;
|
||||
}
|
||||
|
||||
public byte getData()
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
|
||||
public Material getMaterial()
|
||||
{
|
||||
return _material;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package nautilus.game.arcade.game.games.build.gui;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.build.BuildData;
|
||||
import nautilus.game.arcade.game.games.build.gui.page.MobPage;
|
||||
|
||||
public class MobShop extends ShopBase<ArcadeManager>
|
||||
{
|
||||
public MobShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, "Mob Options");
|
||||
}
|
||||
|
||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> buildPagesFor(Player player, BuildData data, Entity entity)
|
||||
{
|
||||
return new MobPage(getPlugin(), this, getClientManager(), getDonationManager(), player, data, entity);
|
||||
}
|
||||
|
||||
public boolean attemptShopOpen(Player player, BuildData data, Entity entity)
|
||||
{
|
||||
if (!getOpenedShop().contains(player.getName()))
|
||||
{
|
||||
if (!canOpenShop(player))
|
||||
return false;
|
||||
|
||||
getOpenedShop().add(player.getName());
|
||||
|
||||
openShopForPlayer(player);
|
||||
if (!getPlayerPageMap().containsKey(player.getName()))
|
||||
{
|
||||
getPlayerPageMap().put(player.getName(), buildPagesFor(player, data, entity));
|
||||
}
|
||||
|
||||
openPageForPlayer(player, getOpeningPageForPlayer(player));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> buildPagesFor(Player player)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.build.Build;
|
||||
import nautilus.game.arcade.game.games.build.gui.page.OptionsMenu;
|
||||
import nautilus.game.arcade.game.games.build.gui.page.OptionsPage;
|
||||
|
||||
public class OptionsShop extends ShopBase<ArcadeManager>
|
||||
{
|
||||
@ -23,6 +23,6 @@ public class OptionsShop extends ShopBase<ArcadeManager>
|
||||
@Override
|
||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> buildPagesFor(Player player)
|
||||
{
|
||||
return new OptionsMenu(_game, getPlugin(), this, getClientManager(), getDonationManager(), player);
|
||||
return new OptionsPage(_game, getPlugin(), this, getClientManager(), getDonationManager(), player);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,81 @@
|
||||
package nautilus.game.arcade.game.games.build.gui.page;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.build.Build;
|
||||
import nautilus.game.arcade.game.games.build.BuildData;
|
||||
import nautilus.game.arcade.game.games.build.GroundData;
|
||||
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
||||
|
||||
public class GroundPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
{
|
||||
private static GroundData[] GROUNDS = {
|
||||
new GroundData(Material.STONE), new GroundData(Material.GRASS), new GroundData(Material.DIRT),
|
||||
new GroundData(Material.SAND), new GroundData(Material.WATER_BUCKET), new GroundData(Material.LAVA_BUCKET),
|
||||
new GroundData(Material.WOOD), new GroundData(Material.COBBLESTONE), new GroundData(Material.NETHERRACK),
|
||||
new GroundData(Material.SMOOTH_BRICK), new GroundData(Material.ENDER_STONE), new GroundData(Material.MYCEL),
|
||||
new GroundData(Material.STAINED_CLAY, (byte) 0), new GroundData(Material.STAINED_CLAY, (byte) 15),
|
||||
new GroundData(Material.STAINED_CLAY, (byte) 4), new GroundData(Material.STAINED_CLAY, (byte) 3),
|
||||
new GroundData(Material.STAINED_CLAY, (byte) 5), new GroundData(Material.STAINED_CLAY, (byte) 6),
|
||||
new GroundData(Material.QUARTZ_BLOCK)};
|
||||
|
||||
private Build _game;
|
||||
|
||||
public GroundPage(Build game, ArcadeManager plugin, OptionsShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Change Ground", player, 9 * 4);
|
||||
_game = game;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
final BuildData buildData = _game.getBuildData(getPlayer());
|
||||
|
||||
if (buildData == null)
|
||||
{
|
||||
getPlayer().closeInventory();
|
||||
return;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (final GroundData data : GROUNDS)
|
||||
{
|
||||
ShopItem shopItem = new ShopItem(data.getMaterial(), data.getData(), ItemStackFactory.Instance.GetName(data.getMaterial(), data.getData(), true), null, 0, false, false);
|
||||
addButton(index, shopItem, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
buildData.setGround(data);
|
||||
}
|
||||
});
|
||||
index++;
|
||||
}
|
||||
|
||||
addButton((9 * 3) + 4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new OptionsPage(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
package nautilus.game.arcade.game.games.build.gui.page;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilSkull;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.build.BuildData;
|
||||
import nautilus.game.arcade.game.games.build.gui.MobShop;
|
||||
|
||||
public class MobPage extends ShopPageBase<ArcadeManager, MobShop>
|
||||
{
|
||||
private BuildData _buildData;
|
||||
private Entity _entity;
|
||||
|
||||
|
||||
public MobPage(ArcadeManager plugin, MobShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player, BuildData buildData, Entity entity)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Mob Options", player, 9);
|
||||
|
||||
_buildData = buildData;
|
||||
_entity = entity;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
// byte entityData = UtilSkull.getSkullData(_entity);
|
||||
|
||||
// Add Skull delete button
|
||||
final String entityName = _entity.getType().getName();
|
||||
// ShopItem head = new ShopItem(Material.SKULL_ITEM, entityData, entityName, new String[] {C.cGray + "Right Click to Delete Entity" }, 0, false, false);
|
||||
// if (UtilSkull.isPlayerHead(entityData))
|
||||
// {
|
||||
// SkullMeta meta = ((SkullMeta) head.getItemMeta());
|
||||
// meta.setOwner(UtilSkull.getPlayerHeadName(_entity));
|
||||
// head.setItemMeta(meta);
|
||||
// }
|
||||
|
||||
// addButton(4, head, new IButton()
|
||||
// {
|
||||
// @Override
|
||||
// public void onClick(Player player, ClickType clickType)
|
||||
// {
|
||||
// if (clickType == ClickType.RIGHT)
|
||||
// {
|
||||
// _buildData.removeEntity(_entity);
|
||||
// UtilPlayer.message(player, F.main("Game", "Entity Deleted"));
|
||||
// player.closeInventory();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
int buttonSlot = 1;
|
||||
if (_entity instanceof Ageable)
|
||||
{
|
||||
final Ageable ageable = ((Ageable) _entity);
|
||||
ShopItem item = new ShopItem(Material.BLAZE_ROD, "Make " + (ageable.isAdult() ? "Baby" : "Adult"), null, 0, false, false);
|
||||
|
||||
addButton(buttonSlot, item, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (ageable.isAdult())
|
||||
ageable.setBaby();
|
||||
else
|
||||
ageable.setAdult();
|
||||
|
||||
UtilPlayer.message(player, F.main("Game", entityName + " is now a " + (ageable.isAdult() ? "Adult" : "Baby")));
|
||||
buildPage();
|
||||
}
|
||||
});
|
||||
|
||||
buttonSlot+= 2;
|
||||
}
|
||||
|
||||
if (_entity instanceof LivingEntity)
|
||||
{
|
||||
final LivingEntity livingEntity = ((LivingEntity) _entity);
|
||||
final boolean ghost = ((CraftLivingEntity) livingEntity).getHandle().ghost;
|
||||
|
||||
ShopItem item = new ShopItem(Material.FEATHER, (ghost ? "Allow " : "Disable ") + "Pushing " + entityName, null, 0, false, false);
|
||||
addButton(buttonSlot, item, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
((CraftLivingEntity) livingEntity).getHandle().ghost = !ghost;
|
||||
UtilPlayer.message(player, F.main("Game", "Pushing " + (ghost ? "Enabled" : "Disabled") + " for " + entityName));
|
||||
buildPage();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
buttonSlot += 2;
|
||||
}
|
||||
|
||||
if (_entity instanceof Slime)
|
||||
{
|
||||
final Slime slime = ((Slime) _entity);
|
||||
|
||||
ShopItem decreaseSize = new ShopItem(Material.CLAY_BALL, "Decrease Size", null, 0, false, false);
|
||||
|
||||
ShopItem increaseSize = new ShopItem(Material.CLAY, "Increase Size", null, 0, false, false);
|
||||
|
||||
addButton(buttonSlot, decreaseSize, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (slime.getSize() <= 1)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", "Slime is already smallest size"));
|
||||
}
|
||||
else
|
||||
{
|
||||
slime.setSize(slime.getSize() - 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
buttonSlot += 2;
|
||||
|
||||
addButton(buttonSlot, increaseSize, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (slime.getSize() >= 10)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", "Slime is already largest size"));
|
||||
}
|
||||
else
|
||||
{
|
||||
slime.setSize(slime.getSize() + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ShopItem deleteButton = new ShopItem(Material.TNT, "Delete " + entityName, null, 0, false);
|
||||
addButton(8, deleteButton, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (clickType == ClickType.RIGHT)
|
||||
{
|
||||
_buildData.removeEntity(_entity);
|
||||
UtilPlayer.message(player, F.main("Game", "Entity Deleted"));
|
||||
player.closeInventory();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
@ -13,11 +14,11 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.build.Build;
|
||||
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
|
||||
|
||||
public class OptionsMenu extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
public class OptionsPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
{
|
||||
private Build _game;
|
||||
|
||||
public OptionsMenu(Build game, ArcadeManager plugin, OptionsShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
|
||||
public OptionsPage(Build game, ArcadeManager plugin, OptionsShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Options", player, 9);
|
||||
_game = game;
|
||||
@ -28,11 +29,46 @@ public class OptionsMenu extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
protected void buildPage()
|
||||
{
|
||||
|
||||
ShopItem ground = new ShopItem(Material.GRASS, "Change Ground", 0, false);
|
||||
final ShopItem flightSpeed = new ShopItem(Material.FEATHER, "Flight Speed", new String[] {C.cWhite + "Left-Click to Increase Speed", C.cWhite + "Shift Left-Click to Decrease Speed" } , 0, false);
|
||||
ShopItem particles = new ShopItem(Material.NETHER_STAR, "Particles", 0, false);
|
||||
ShopItem weather = new ShopItem(Material.FEATHER, "Weather", 0, false);
|
||||
ShopItem weather = new ShopItem(Material.SAPLING, "Weather", 0, false);
|
||||
ShopItem time = new ShopItem(Material.WATCH, "Time of Day", 0, false);
|
||||
|
||||
addButton(2, particles, new IButton()
|
||||
addButton(0, ground, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new GroundPage(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
}
|
||||
});
|
||||
|
||||
final int maxLevel = 8;
|
||||
final float minLevel = 0.1F;
|
||||
final float perLevel = (1F - minLevel) / (maxLevel - 1);
|
||||
flightSpeed.setAmount((int)((getPlayer().getFlySpeed() - minLevel) / perLevel) + 1);
|
||||
addButton(2, flightSpeed, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (clickType == ClickType.SHIFT_LEFT)
|
||||
{
|
||||
int newLevel = Math.max(1, flightSpeed.getAmount() - 1);
|
||||
player.setFlySpeed(minLevel + ((newLevel - 1) * perLevel));
|
||||
}
|
||||
else if (clickType == ClickType.LEFT)
|
||||
{
|
||||
int newLevel = Math.min(maxLevel, flightSpeed.getAmount() + 1);
|
||||
player.setFlySpeed(minLevel + ((newLevel - 1) * perLevel));
|
||||
}
|
||||
|
||||
buildPage();
|
||||
}
|
||||
});
|
||||
|
||||
addButton(4, particles, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
@ -41,7 +77,7 @@ public class OptionsMenu extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
}
|
||||
});
|
||||
|
||||
addButton(4, weather, new IButton()
|
||||
addButton(6, weather, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
@ -50,7 +86,7 @@ public class OptionsMenu extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
}
|
||||
});
|
||||
|
||||
addButton(6, time, new IButton()
|
||||
addButton(8, time, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
@ -79,7 +79,7 @@ public class ParticlesPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new OptionsMenu(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
getShop().openPageForPlayer(player, new OptionsPage(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -44,8 +44,9 @@ public class TimePage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
int time = (6 + (ticks / 1000)) % 12;
|
||||
if (time == 0) time = 12;
|
||||
|
||||
byte data = (byte) (buildData.Time == ticks ? 5 : 14);
|
||||
ShopItem item = new ShopItem(Material.STAINED_CLAY, data, time + (am ? " am" : " pm"), null, 0, false, false);
|
||||
Material material = buildData.Time == ticks ? Material.WATCH : Material.INK_SACK;
|
||||
byte data = (byte) (buildData.Time == ticks ? 0 : 8);
|
||||
ShopItem item = new ShopItem(material, data, time + (am ? "am" : "pm"), null, 0, false, false);
|
||||
addButton(i, item, new IButton()
|
||||
{
|
||||
@Override
|
||||
@ -62,7 +63,7 @@ public class TimePage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new OptionsMenu(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
getShop().openPageForPlayer(player, new OptionsPage(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class WeatherPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
|
||||
ShopItem sunny = new ShopItem(Material.DOUBLE_PLANT, "Sunny", 1, false);
|
||||
ShopItem raining = new ShopItem(Material.WATER_BUCKET, "Raining", 1, false);
|
||||
ShopItem storming = new ShopItem(Material.BLAZE_ROD, "Storming", 1, false);
|
||||
ShopItem storming = new ShopItem(Material.GOLD_NUGGET, "Storming", 1, false);
|
||||
|
||||
addButton(sunnySlot, sunny, new IButton()
|
||||
{
|
||||
@ -93,7 +93,7 @@ public class WeatherPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new OptionsMenu(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
getShop().openPageForPlayer(player, new OptionsPage(_game, getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package nautilus.game.arcade.game.games.build.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class KitBuilder extends Kit
|
||||
{
|
||||
public KitBuilder(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Builder", KitAvailability.Free,
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Can I build it!? Yes I can!"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
{
|
||||
},
|
||||
EntityType.SKELETON,
|
||||
new ItemStack(Material.WOOD));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -48,6 +48,7 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -880,7 +881,8 @@ public class CastleSiege extends TeamGame
|
||||
if (event.getClickedBlock() == null || event.getClickedBlock().getTypeId() != 85)
|
||||
return;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, event.getClickedBlock().getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, event.getClickedBlock().getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
event.getClickedBlock().getWorld().playSound(event.getClickedBlock().getLocation(), Sound.NOTE_STICKS, 2f, 1f);
|
||||
Manager.GetBlockRestore().Add(event.getClickedBlock(), 0, (byte)0, 1000);
|
||||
}
|
||||
|
@ -7,7 +7,9 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
@ -129,8 +131,10 @@ public class PumpkinKing
|
||||
|
||||
public void Die()
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, _ent.getLocation(), 0, 1, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, _ent.getLocation(), 0.25f, 1, 0.25f, 0, 50);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, _ent.getLocation(), 0, 1, 0, 0, 1,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, _ent.getLocation(), 0.25f, 1, 0.25f, 0, 50,
|
||||
ViewDist.LONGER, UtilServer.getPlayers());
|
||||
|
||||
_ent.getWorld().playSound(_ent.getLocation(), Sound.ENDERDRAGON_DEATH, 4f, 0.5f);
|
||||
|
||||
|
@ -11,6 +11,7 @@ import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -100,7 +101,8 @@ public class Part1 extends Part
|
||||
event.setCancelled(true);
|
||||
|
||||
event.getEntity().getWorld().playSound(event.getLocation(), Sound.EXPLODE, 4f, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, event.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, event.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
@ -109,7 +111,8 @@ public class Part1 extends Part
|
||||
event.setCancelled(true);
|
||||
|
||||
event.getEntity().getWorld().playSound(event.getEntity().getLocation(), Sound.EXPLODE, 4f, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, event.getEntity().getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, event.getEntity().getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
private void UpdateSkeleton()
|
||||
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.Location;
|
||||
@ -28,6 +29,7 @@ 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;
|
||||
@ -39,9 +41,12 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
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;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -92,7 +97,7 @@ public class Gravity extends SoloGame
|
||||
|
||||
_help = new String[]
|
||||
{
|
||||
"Push DROP to launch yourself off platforms.",
|
||||
"Drop Item to launch yourself off platforms.",
|
||||
"You automatically grab onto nearby platforms.",
|
||||
"Hold Block to use your Jetpack",
|
||||
"Your Experience Bar is your Jetpack Fuel",
|
||||
@ -110,6 +115,8 @@ public class Gravity extends SoloGame
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
|
||||
this.VersionRequire1_8 = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -132,12 +139,59 @@ public class Gravity extends SoloGame
|
||||
@EventHandler
|
||||
public void AnnounceBoost(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
Announce(C.Bold + C.cPurple + "Press " + C.Bold + C.cWhite + "DROP WEAPON" + C.Bold + C.cPurple + " to boost yourself off platforms!");
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cGreen + "Drop Weapon" + C.cWhite + " to boost off Platforms", 0, 120, 0);
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
UtilTextMiddle.display(null, C.cGreen + "Hold Block" + C.cWhite + " to use Jetpack", 0, 80, 5);
|
||||
}
|
||||
}, 120);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void cleanObjects(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
//Objects
|
||||
Iterator<GravityObject> oIter = _objects.iterator();
|
||||
|
||||
while (oIter.hasNext())
|
||||
{
|
||||
GravityObject o = oIter.next();
|
||||
|
||||
if (o instanceof GravityPlayer)
|
||||
continue;
|
||||
|
||||
if (!isInsideMap(o.Base.getLocation()))
|
||||
{
|
||||
o.remove();
|
||||
}
|
||||
}
|
||||
|
||||
//Projectiles
|
||||
Iterator<Arrow> arrowIter = _arrows.keySet().iterator();
|
||||
|
||||
while (arrowIter.hasNext())
|
||||
{
|
||||
Arrow arrow = arrowIter.next();
|
||||
|
||||
if (!isInsideMap(arrow.getLocation()))
|
||||
{
|
||||
arrow.remove();
|
||||
arrowIter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ClearObjects(GameStateChangeEvent event)
|
||||
{
|
||||
@ -153,11 +207,14 @@ public class Gravity extends SoloGame
|
||||
@EventHandler
|
||||
public void KickOff(PlayerDropItemEvent event)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
for (GravityObject object : _objects)
|
||||
if (object instanceof GravityPlayer)
|
||||
((GravityPlayer)object).KickOff(event.getPlayer());
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -542,8 +599,8 @@ public class Gravity extends SoloGame
|
||||
else
|
||||
{
|
||||
arrow.setVelocity(_arrows.get(arrow));
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, arrow.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
arrow.getWorld().playSound(arrow.getLocation(), Sound.FIZZ, 0.3f, 0.5f);
|
||||
}
|
||||
}
|
||||
@ -552,6 +609,9 @@ public class Gravity extends SoloGame
|
||||
@EventHandler
|
||||
public void BowHit(ProjectileHitEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
BowExplode(event.getEntity());
|
||||
}
|
||||
|
||||
@ -609,7 +669,8 @@ public class Gravity extends SoloGame
|
||||
}
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, proj.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, proj.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
proj.getWorld().playSound(proj.getLocation(), Sound.EXPLODE, 0.6f, 1.5f);
|
||||
|
||||
//Remove
|
||||
@ -651,7 +712,8 @@ public class Gravity extends SoloGame
|
||||
{
|
||||
if (UtilMath.offset(player.getLocation(), _powerup) < 3)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", "You collected " + F.skill("Jetpack Fuel") + "!"));
|
||||
UtilTextMiddle.display(null, C.cGreen + "Collected Jetpack Fuel", 0, 80, 5, player);
|
||||
|
||||
player.setExp(Math.min(0.9999f, player.getExp() + 0.25f));
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.DRINK, 1f, 0.5f);
|
||||
@ -662,5 +724,5 @@ public class Gravity extends SoloGame
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,13 @@ package nautilus.game.arcade.game.games.gravity;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
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;
|
||||
@ -31,7 +34,7 @@ public abstract class GravityObject
|
||||
|
||||
public GravityObject(Gravity host, Entity ent, double mass, double size, Vector vel)
|
||||
{
|
||||
Host = host;
|
||||
Host = host;
|
||||
|
||||
Ent = ent;
|
||||
Mass = mass;
|
||||
@ -57,6 +60,7 @@ public abstract class GravityObject
|
||||
|
||||
UtilEnt.Vegetate(Base, true);
|
||||
//UtilEnt.ghost(Base, true, true);
|
||||
Host.Manager.GetCondition().Factory().Invisible(null, Base, null, 9999, 1, false, false, false);
|
||||
}
|
||||
|
||||
public boolean IsPlayer()
|
||||
@ -86,15 +90,18 @@ public abstract class GravityObject
|
||||
{
|
||||
if (this instanceof GravityPlayer)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, Ent.getLocation().subtract(0, 0.5, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, Ent.getLocation().subtract(0, 0.5, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
else if (this instanceof GravityBomb)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Ent.getLocation().add(0, -0.1, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Ent.getLocation().add(0, -0.1, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
else if (this instanceof GravityHook)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, Ent.getLocation().add(0, 0.1, 0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, Ent.getLocation().add(0, 0.1, 0), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,4 +221,12 @@ public abstract class GravityObject
|
||||
Bat.setSitting(!moving);
|
||||
//Host.Manager.GetDisguise().updateDisguise(Bat);
|
||||
}
|
||||
|
||||
public void remove()
|
||||
{
|
||||
if (Base.getPassenger() != null)
|
||||
Base.getPassenger().remove();
|
||||
|
||||
Base.remove();
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,10 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import nautilus.game.arcade.game.games.gravity.Gravity;
|
||||
import nautilus.game.arcade.game.games.gravity.GravityObject;
|
||||
|
||||
@ -172,7 +174,8 @@ public class GravityBomb extends GravityObject
|
||||
public void CustomCollide(GravityObject other)
|
||||
{
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, Ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, Ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
Ent.getWorld().playSound(Ent.getLocation(), Sound.EXPLODE, 0.3f, 1f);
|
||||
Ent.remove();
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package nautilus.game.arcade.game.games.gravity.objects;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import nautilus.game.arcade.game.games.gravity.Gravity;
|
||||
import nautilus.game.arcade.game.games.gravity.GravityObject;
|
||||
|
||||
@ -15,13 +17,15 @@ public class GravityDebris extends GravityObject
|
||||
super(host, ent, mass, 2, vel);
|
||||
|
||||
CollideDelay = System.currentTimeMillis() + 500;
|
||||
SetMovingBat(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void CustomCollide(GravityObject other)
|
||||
{
|
||||
Ent.remove();
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, Ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, Ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
public boolean CanCollide(GravityObject other)
|
||||
|
@ -3,12 +3,16 @@ package nautilus.game.arcade.game.games.gravity.objects;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.games.gravity.Gravity;
|
||||
import nautilus.game.arcade.game.games.gravity.GravityObject;
|
||||
@ -39,7 +43,7 @@ public class GravityPlayer extends GravityObject
|
||||
}
|
||||
|
||||
public boolean NearBlock()
|
||||
{
|
||||
{
|
||||
return !NearBlockList().isEmpty();
|
||||
}
|
||||
|
||||
@ -76,7 +80,7 @@ public class GravityPlayer extends GravityObject
|
||||
|
||||
public void AutoGrab()
|
||||
{
|
||||
UtilPlayer.message(this.Ent, "Bat: " + Base.getLocation().getY());
|
||||
//UtilPlayer.message(this.Ent, "Bat: " + Base.getLocation().getY());
|
||||
|
||||
if (Vel.length() == 0)
|
||||
return;
|
||||
@ -88,7 +92,7 @@ public class GravityPlayer extends GravityObject
|
||||
return;
|
||||
|
||||
Vel.multiply(0);
|
||||
Base.setVelocity(new Vector(0,0,0));
|
||||
Base.setVelocity(new Vector(0,0.1,0));
|
||||
|
||||
GrabDelay = System.currentTimeMillis();
|
||||
|
||||
@ -109,6 +113,20 @@ public class GravityPlayer extends GravityObject
|
||||
if (!Ent.equals(player))
|
||||
return;
|
||||
|
||||
boolean nearBlock = false;
|
||||
for (Block block : UtilBlock.getSurrounding(Base.getLocation().getBlock(), true))
|
||||
{
|
||||
if (block.getType() != Material.AIR)
|
||||
{
|
||||
nearBlock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Requires near block OR batsit
|
||||
if (!Bat.isSitting() && !nearBlock)
|
||||
return;
|
||||
|
||||
GrabDelay = System.currentTimeMillis();
|
||||
|
||||
AddVelocity(player.getLocation().getDirection().multiply(0.5), 0.5);
|
||||
@ -138,11 +156,14 @@ public class GravityPlayer extends GravityObject
|
||||
if (player.getExp() <= 0)
|
||||
{
|
||||
if (Recharge.Instance.use(player, "Fuel", 1000, false, false))
|
||||
UtilPlayer.message(Ent, F.main("Skill", "You have no more " + F.skill("Jetpack Fuel") + "."));
|
||||
{
|
||||
UtilTextMiddle.display(C.cRed + "Jetpack Empty", "Collect Fuel at Gold Blocks with Fireworks", 0, 80, 5, (Player)Ent);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
player.setExp((float) Math.max(0, player.getExp()-0.004));
|
||||
player.setExp((float) Math.max(0, player.getExp()-0.005));
|
||||
|
||||
AddVelocity(player.getLocation().getDirection().multiply(0.025), 0.5);
|
||||
|
||||
@ -150,7 +171,8 @@ public class GravityPlayer extends GravityObject
|
||||
Ent.getWorld().playSound(Ent.getLocation(), Sound.GHAST_FIREBALL, 0.3f, 2f);
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Ent.getLocation().add(0, 0.5, 0), 0.1f, 0.1f, 0.1f, 0, 2);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, Ent.getLocation().add(0, 0.5, 0), 0.1f, 0.1f, 0.1f, 0, 2,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
public void Oxygen()
|
||||
@ -168,7 +190,11 @@ public class GravityPlayer extends GravityObject
|
||||
//Restore
|
||||
if (near)
|
||||
{
|
||||
UtilPlayer.message(Ent, F.main("Game", "Restoring Oxygen..."));
|
||||
if (Base.getHealth() < 58)
|
||||
UtilTextMiddle.display(null, "Refilling Oxygen...", 0, 60, 5, (Player)Ent);
|
||||
else
|
||||
UtilTextMiddle.display(null, C.cGreen + "Oxygen Full", 0, 60, 5, (Player)Ent);
|
||||
|
||||
Ent.getWorld().playSound(Ent.getLocation(), Sound.CAT_HISS, 0.2f, 0.5f);
|
||||
|
||||
Base.setHealth(Math.min(60, Base.getHealth() + 10));
|
||||
@ -186,8 +212,7 @@ public class GravityPlayer extends GravityObject
|
||||
DamageCause.CUSTOM, 2, false, true, false,
|
||||
"Oxygen Depleted", "Oxygen Depleted");
|
||||
|
||||
UtilPlayer.message(Ent, F.main("Game", "You are suffocating!"));
|
||||
UtilPlayer.message(Ent, F.main("Game", "Get more Oxygen from the Emerald Blocks!"));
|
||||
UtilTextMiddle.display(C.cRed + "Suffocating", "Refill Oxygen at Emerald Blocks", 0, 60, 5, (Player)Ent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
@ -20,6 +19,7 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -257,7 +257,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
if (GetState() >= 4)
|
||||
{
|
||||
//Particles
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, GetEntity().getLocation().add(0, 1.5, 0), 0.2f, 0.4f, 0.2f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, GetEntity().getLocation().add(0, 1.5, 0), 0.2f, 0.4f, 0.2f, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@ -404,7 +405,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
{
|
||||
Skeleton minion = _minions.get(i);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
minion.setTarget(null);
|
||||
|
||||
@ -465,7 +467,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
{
|
||||
final Skeleton minion = _minions.get(i);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
LivingEntity target = _minionTargets.get(minion);
|
||||
if (target == null)
|
||||
@ -657,7 +660,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
{
|
||||
Entity shield = _shields.get(i);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, shield.getLocation(), 0.1f, 0.1f, 0.1f, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FLAME, shield.getLocation(), 0.1f, 0.1f, 0.1f, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
double lead = i * ((2d * Math.PI)/_shields.size());
|
||||
|
||||
|
@ -58,6 +58,7 @@ import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
@ -917,7 +918,8 @@ public class HideSeek extends TeamGame
|
||||
|
||||
this.AddGems(player, 0.25, "Meows", true, true);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.NOTE, player.getLocation().add(0, 0.75, 0), 0.4f, 0.4f, 0.4f, 0, 6);
|
||||
UtilParticle.PlayParticle(ParticleType.NOTE, player.getLocation().add(0, 0.75, 0), 0.4f, 0.4f, 0.4f, 0, 6,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new MeowEvent(event.getPlayer()));
|
||||
}
|
||||
@ -1524,7 +1526,8 @@ public class HideSeek extends TeamGame
|
||||
|
||||
public void InfestStart(LivingEntity ent)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.SLIME, ent.getLocation().add(0, 0.6, 0), 0.3f, 0.3f, 0.3f, 0, 24);
|
||||
UtilParticle.PlayParticle(ParticleType.SLIME, ent.getLocation().add(0, 0.6, 0), 0.3f, 0.3f, 0.3f, 0, 24,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.SLIME_ATTACK, 2f, 1f);
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.SLIME_ATTACK, 2f, 1f);
|
||||
|
||||
|
@ -74,6 +74,7 @@ import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
@ -259,6 +260,8 @@ public class MineStrike extends TeamGame
|
||||
this.InventoryClick = true;
|
||||
|
||||
this.JoinInProgress = true;
|
||||
|
||||
this.VersionRequire1_8 = true;
|
||||
|
||||
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("HP", "dummy");
|
||||
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
|
||||
@ -966,7 +969,8 @@ public class MineStrike extends TeamGame
|
||||
|
||||
//Particle
|
||||
if (bullet != null && bullet.Shooter != null)
|
||||
UtilParticle.PlayParticle(bullet.Shooter, ParticleType.FIREWORKS_SPARK, event.getEntity().getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, event.getEntity().getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, bullet.Shooter);
|
||||
|
||||
//Hit Block Sound
|
||||
event.getEntity().getWorld().playSound(event.getEntity().getLocation(), Sound.ENDERMAN_HIT, 1f, 1f);
|
||||
@ -1049,7 +1053,8 @@ public class MineStrike extends TeamGame
|
||||
|
||||
//Particle
|
||||
if (bullet != null && bullet.Shooter != null)
|
||||
UtilParticle.PlayParticle(bullet.Shooter, ParticleType.FIREWORKS_SPARK, arrow.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, arrow.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, bullet.Shooter);
|
||||
|
||||
//Hit Block Sound
|
||||
arrow.getWorld().playSound(arrow.getLocation(), Sound.ENDERMAN_HIT, 1f, 1f);
|
||||
@ -1063,7 +1068,8 @@ public class MineStrike extends TeamGame
|
||||
{
|
||||
loc.add(UtilAlg.getTrajectory(loc, arrow.getLocation()).multiply(1));
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, loc, 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, loc, 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
//Block Particle
|
||||
@ -1459,7 +1465,8 @@ public class MineStrike extends TeamGame
|
||||
{
|
||||
Entity grenadeItem = grenadeIterator.next();
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, grenadeItem.getLocation(), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CRIT, grenadeItem.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
|
||||
//Expired
|
||||
if (!grenadeItem.isValid() || grenadeItem.getTicksLived() > 400)
|
||||
@ -1763,7 +1770,8 @@ public class MineStrike extends TeamGame
|
||||
if (_bombItem == null)
|
||||
return;
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, _bombItem.getLocation().add(0.0, 0.2, 0.0), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, _bombItem.getLocation().add(0.0, 0.2, 0.0), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
public int getScore(GameTeam team)
|
||||
@ -2701,40 +2709,7 @@ public class MineStrike extends TeamGame
|
||||
other.playSound(player.getLocation(), radio.getSound(), 1.5f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void joinMessage(PlayerJoinEvent event)
|
||||
{
|
||||
if (!UtilPlayer.is1_8(event.getPlayer()))
|
||||
returnToHub(event.getPlayer());
|
||||
|
||||
else
|
||||
UtilTextMiddle.display(C.cGold + C.Bold + "MineStrike", "Make sure you accept the Resource Pack", 20, 120, 20, event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void outdatedVersion(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (!UtilPlayer.is1_8(player))
|
||||
returnToHub(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void returnToHub(Player player)
|
||||
{
|
||||
UtilPlayer.message(player, " ");
|
||||
UtilPlayer.message(player, C.cGold + C.Bold + "Mine-Strike requires you to be using Minecraft 1.8!");
|
||||
UtilPlayer.message(player, " ");
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
|
||||
Manager.GetPortal().sendPlayerToServer(player, "Lobby");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void debug(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
|
@ -1,8 +1,10 @@
|
||||
package nautilus.game.arcade.game.games.minestrike.data;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -53,7 +55,8 @@ public class Bomb
|
||||
if (UtilTime.elapsed(LastBeep, beepDuration))
|
||||
{
|
||||
Block.getWorld().playSound(Block.getLocation(), Sound.ANVIL_BREAK, volume, 1f);
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, Block.getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, Block.getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
LastBeep = System.currentTimeMillis();
|
||||
}
|
||||
@ -63,7 +66,8 @@ public class Bomb
|
||||
clean();
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, Block.getLocation(), 10f, 10f, 10f, 0, 30);
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, Block.getLocation(), 10f, 10f, 10f, 0, 30,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
for (int i=0 ; i<3 ; i++)
|
||||
Block.getWorld().playSound(Block.getLocation(), Sound.ANVIL_LAND, 20f, (float)(Math.random() * 0.5 + 0.5));
|
||||
@ -87,7 +91,8 @@ public class Bomb
|
||||
clean();
|
||||
|
||||
//Effect
|
||||
UtilParticle.PlayParticle(ParticleType.CLOUD, Block.getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1);
|
||||
UtilParticle.PlayParticle(ParticleType.CLOUD, Block.getLocation().add(0.5, 0.5, 0.5), 0, 0, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
public void clean()
|
||||
|
@ -7,6 +7,7 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.minestrike.MineStrike;
|
||||
import nautilus.game.arcade.game.games.minestrike.Radio;
|
||||
@ -54,7 +55,8 @@ public abstract class FireGrenadeBase extends Grenade
|
||||
loc.getWorld().playSound(loc, Sound.IRONGOLEM_THROW, 1f, 1f);
|
||||
|
||||
//Particle
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, loc.add(0, 0.2, 0), 0.3f, 0f, 0.3f, 0, 30);
|
||||
UtilParticle.PlayParticle(ParticleType.LAVA, loc.add(0, 0.2, 0), 0.3f, 0f, 0.3f, 0, 30,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
//Fire Blocks
|
||||
final HashMap<Block, Double> blocks = UtilBlock.getInRadius(loc, 3.5d);
|
||||
|
@ -5,7 +5,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.minestrike.MineStrike;
|
||||
@ -36,7 +38,8 @@ public class HighExplosive extends Grenade
|
||||
if (ent.getTicksLived() > 40)
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION,
|
||||
ent.getLocation(), 0, 0, 0, 0, 1);
|
||||
ent.getLocation(), 0, 0, 0, 0, 1,
|
||||
ViewDist.MAX, UtilServer.getPlayers());
|
||||
ent.getWorld().playSound(ent.getLocation(),
|
||||
Sound.EXPLODE, 3f, 0.8f);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user