Cosmetic Update
+ Set Storm + Set Shadow + Set Music + Set Emerald + Set Blood + Set Enchant + Particle Ying and Yang + Particle Wings Angel + Particle Wings Infernal + Particle Wings Pixie + Shape Utils * Particle Party Time * Particle Heart * Double Jump Firecracker
This commit is contained in:
parent
6e6f46671b
commit
c4da8ef636
@ -4,26 +4,40 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
public class ShapeGrid extends Shape
|
public class ShapeGrid extends Shape
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Each string in the array represents a layer on the XY-plane, meaning the layers moves towards positive Z.
|
* Each string in the array represents a layer on the XY-plane, meaning the layers moves towards positive Z.
|
||||||
* Each line in the string represents a line on parallel with the X-axis, where the first line is on the top of the shape.
|
* Each line in the string represents a line on parallel with the X-axis, where the first line is on the top of the shape.
|
||||||
* Use '#' for each point and anything else for each "non-point".
|
* Use '#' for each point and anything else for each "non-point".
|
||||||
* The finished shape will then be centered afterwards.
|
* The finished shape will then be centered afterwards.
|
||||||
*/
|
*/
|
||||||
public ShapeGrid(String...input)
|
public ShapeGrid(String... input)
|
||||||
{
|
{
|
||||||
this(DefaultDencity, input);
|
this(DefaultDencity, '#', input);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Each string in the array represents a layer on the XY-plane, meaning the layers moves towards positive Z.
|
||||||
|
* Each line in the string represents a line on parallel with the X-axis, where the first line is on the top of the shape.
|
||||||
|
* Use the <code>read</code> char for each point and anything else for each "non-point".
|
||||||
|
* The finished shape will then be centered afterwards.
|
||||||
|
*/
|
||||||
|
public ShapeGrid(char read, String...input)
|
||||||
|
{
|
||||||
|
this(DefaultDencity, read, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Each string in the array represents a layer on the XY-plane, meaning the layers moves towards positive Z.
|
* Each string in the array represents a layer on the XY-plane, meaning the layers moves towards positive Z.
|
||||||
* Each line in the string represents a line on parallel with the X-axis.
|
* Each line in the string represents a line on parallel with the X-axis.
|
||||||
* Use '#' for each point and '_' for each "non-point".
|
* Use the <code>read</code> char for each point and anything else for each "non-point".
|
||||||
* The finished shape will then be centered afterwards.
|
* The finished shape will then be centered afterwards.
|
||||||
*/
|
*/
|
||||||
public ShapeGrid(double dencity, String...input)
|
public ShapeGrid(double dencity, char read, String...input)
|
||||||
{
|
{
|
||||||
|
int lx = 0;
|
||||||
|
int ly = 0;
|
||||||
|
int lz = 0;
|
||||||
for(int y = 0; y < input.length; y++)
|
for(int y = 0; y < input.length; y++)
|
||||||
{
|
{
|
||||||
String[] lines = input[y].split("\n");
|
String[] lines = input[y].split("\n");
|
||||||
@ -32,12 +46,15 @@ public class ShapeGrid extends Shape
|
|||||||
String line = lines[z];
|
String line = lines[z];
|
||||||
for(int x = 0; x < line.length(); x++)
|
for(int x = 0; x < line.length(); x++)
|
||||||
{
|
{
|
||||||
if(line.charAt(x) == '#') addPoint(new Vector(x,-y+input.length,z).multiply(dencity));
|
if(line.charAt(x) == read) addPoint(new Vector(x,-y+input.length,z).multiply(dencity));
|
||||||
|
if(x > lx) lx = x;
|
||||||
|
if(-y+input.length > ly) ly = -y+input.length;
|
||||||
|
if(z > lz) lz= z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add(getMidPoint().multiply(-1));
|
add(new Vector(lx,ly,lz).multiply(-0.5*dencity));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,22 +24,29 @@ public class ShapeWings extends ShapeGrid implements ICosmeticShape
|
|||||||
{
|
{
|
||||||
this(particle, null, 0, 1);
|
this(particle, null, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShapeWings(String particle, Vector offsetData, float speed, int count)
|
public ShapeWings(String particle, Vector offsetData, float speed, int count)
|
||||||
{
|
{
|
||||||
super(0.15,
|
this(particle, offsetData, 0, 1, false);
|
||||||
"##0000000000000000##",
|
}
|
||||||
"0##00000000000000##0",
|
|
||||||
"00##000000000000##00",
|
public ShapeWings(String particle, Vector offsetData, float speed, int count, boolean edge)
|
||||||
"00###0000000000###00",
|
{
|
||||||
"000####000000####000",
|
super(0.15, edge? '$' : '#',
|
||||||
"000######00#####0000",
|
"0$$0000000000000000$$0",
|
||||||
"0000############0000",
|
"$##$00000000000000$##$",
|
||||||
"00000##########00000",
|
"0$##$000000000000$##$0",
|
||||||
"00000##########00000",
|
"00$##$0000000000$##$00",
|
||||||
"00000####000###00000",
|
"00$###$00000000$###$00",
|
||||||
"00000###0000###00000",
|
"000$####$0000$####$000",
|
||||||
"00000##000000##00000"
|
"000$######$$#####$0000",
|
||||||
|
"0000$############$0000",
|
||||||
|
"00000$##########$00000",
|
||||||
|
"00000$##########$00000",
|
||||||
|
"00000$####$$$###$00000",
|
||||||
|
"00000$###$000$###$0000",
|
||||||
|
"00000$##$00000$##$0000",
|
||||||
|
"000000$000000000$00000"
|
||||||
);
|
);
|
||||||
|
|
||||||
_particle = particle;
|
_particle = particle;
|
||||||
@ -58,8 +65,16 @@ public class ShapeWings extends ShapeGrid implements ICosmeticShape
|
|||||||
for(Vector v : clone._points)
|
for(Vector v : clone._points)
|
||||||
{
|
{
|
||||||
Location ploc = loc.clone().add(v);
|
Location ploc = loc.clone().add(v);
|
||||||
UtilParticle.PlayParticleToAll(_particle, ploc, _offsetData, _speed, _count, ViewDist.NORMAL);
|
displayParticle(ploc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a single particle of the type provided to this shape at the given location.
|
||||||
|
*/
|
||||||
|
public void displayParticle(Location loc)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(_particle, loc, _offsetData, _speed, _count, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public class UtilColor
|
|||||||
|
|
||||||
public static Vector colorToVector(Color color)
|
public static Vector colorToVector(Color color)
|
||||||
{
|
{
|
||||||
return new Vector((color.getRed()/255.0)-1, color.getGreen()/255.0, color.getBlue()/255.0);
|
return new Vector(Math.max(color.getRed()/255.0, 0.00001f), color.getGreen()/255.0, color.getBlue()/255.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RGBData hexToRgb(int hex)
|
public static RGBData hexToRgb(int hex)
|
||||||
|
@ -32,20 +32,115 @@ import mineplex.core.disguise.DisguiseManager;
|
|||||||
import mineplex.core.donation.DonationManager;
|
import mineplex.core.donation.DonationManager;
|
||||||
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
|
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
|
||||||
import mineplex.core.gadget.event.GadgetEnableEvent;
|
import mineplex.core.gadget.event.GadgetEnableEvent;
|
||||||
import mineplex.core.gadget.gadgets.arrowtrail.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood;
|
||||||
import mineplex.core.gadget.gadgets.death.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane;
|
||||||
import mineplex.core.gadget.gadgets.doublejump.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti;
|
||||||
import mineplex.core.gadget.gadgets.hat.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid;
|
||||||
import mineplex.core.gadget.gadgets.item.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald;
|
||||||
import mineplex.core.gadget.gadgets.morph.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant;
|
||||||
import mineplex.core.gadget.gadgets.outfit.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord;
|
||||||
import mineplex.core.gadget.gadgets.particle.*;
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathCandyCane;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathCupidsBorkenHeart;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathFrostLord;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathPinataBurst;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathTitan;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatCoal;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatGrinch;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatPresent;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatRudolph;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatSanta;
|
||||||
|
import mineplex.core.gadget.gadgets.hat.HatSnowman;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemBatGun;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemCoal;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemCoinBomb;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemDuelingSword;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemEtherealPearl;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemFirework;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemFleshHook;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemFreezeCannon;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemMelonLauncher;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemPaintballGun;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemPaintbrush;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemPartyPopper;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemSnowball;
|
||||||
|
import mineplex.core.gadget.gadgets.item.ItemTNT;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphBat;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphBlaze;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphBlock;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphBunny;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphChicken;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphCow;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphCreeper;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphEnderman;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphPig;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphPumpkinKing;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphSlime;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphSnowman;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphTitan;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphVillager;
|
||||||
|
import mineplex.core.gadget.gadgets.morph.MorphWither;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitRaveSuitBoots;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitRaveSuitChestplate;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitRaveSuitHelmet;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitRaveSuitLeggings;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuitBoots;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuitChestplate;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuitHelmet;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuitLeggings;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.OutfitTeam;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleCandyCane;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleWingsDemons;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleYinYang;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleFireRings;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleFoot;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleFrostLord;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleHeart;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleLegend;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticlePartyTime;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleRain;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleTitan;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleWingsAngel;
|
||||||
|
import mineplex.core.gadget.set.SetBlood;
|
||||||
import mineplex.core.gadget.set.SetCandyCane;
|
import mineplex.core.gadget.set.SetCandyCane;
|
||||||
import mineplex.core.gadget.set.SetCupidsWings;
|
import mineplex.core.gadget.set.SetCupidsWings;
|
||||||
|
import mineplex.core.gadget.set.SetEmerald;
|
||||||
|
import mineplex.core.gadget.set.SetEnchant;
|
||||||
import mineplex.core.gadget.set.SetFrostLord;
|
import mineplex.core.gadget.set.SetFrostLord;
|
||||||
|
import mineplex.core.gadget.set.SetMusic;
|
||||||
import mineplex.core.gadget.set.SetParty;
|
import mineplex.core.gadget.set.SetParty;
|
||||||
import mineplex.core.gadget.set.SetRaveSuit;
|
import mineplex.core.gadget.set.SetRaveSuit;
|
||||||
|
import mineplex.core.gadget.set.SetShadow;
|
||||||
import mineplex.core.gadget.set.SetSpaceSuit;
|
import mineplex.core.gadget.set.SetSpaceSuit;
|
||||||
|
import mineplex.core.gadget.set.SetStorm;
|
||||||
import mineplex.core.gadget.set.SetTitan;
|
import mineplex.core.gadget.set.SetTitan;
|
||||||
import mineplex.core.gadget.types.ArrowEffectGadget;
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
import mineplex.core.gadget.types.DeathEffectGadget;
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
@ -67,6 +162,7 @@ import mineplex.core.projectile.ProjectileManager;
|
|||||||
|
|
||||||
public class GadgetManager extends MiniPlugin
|
public class GadgetManager extends MiniPlugin
|
||||||
{
|
{
|
||||||
|
//TODO: ADD STORM, ENCHANT, MUSIC & BLOOD SET!
|
||||||
private CoreClientManager _clientManager;
|
private CoreClientManager _clientManager;
|
||||||
private DonationManager _donationManager;
|
private DonationManager _donationManager;
|
||||||
private InventoryManager _inventoryManager;
|
private InventoryManager _inventoryManager;
|
||||||
@ -122,6 +218,12 @@ public class GadgetManager extends MiniPlugin
|
|||||||
addSet(new SetSpaceSuit(this));
|
addSet(new SetSpaceSuit(this));
|
||||||
addSet(new SetParty(this));
|
addSet(new SetParty(this));
|
||||||
addSet(new SetCupidsWings(this));
|
addSet(new SetCupidsWings(this));
|
||||||
|
addSet(new SetEmerald(this));
|
||||||
|
addSet(new SetShadow(this));
|
||||||
|
addSet(new SetEnchant(this));
|
||||||
|
addSet(new SetStorm(this));
|
||||||
|
addSet(new SetBlood(this));
|
||||||
|
addSet(new SetMusic(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateGadgets()
|
private void CreateGadgets()
|
||||||
@ -179,11 +281,7 @@ public class GadgetManager extends MiniPlugin
|
|||||||
|
|
||||||
// Particles
|
// Particles
|
||||||
addGadget(new ParticleFoot(this));
|
addGadget(new ParticleFoot(this));
|
||||||
addGadget(new ParticleEnchant(this));
|
|
||||||
addGadget(new ParticleFireRings(this));
|
addGadget(new ParticleFireRings(this));
|
||||||
addGadget(new ParticleRain(this));
|
|
||||||
addGadget(new ParticleHelix(this));
|
|
||||||
addGadget(new ParticleGreen(this));
|
|
||||||
addGadget(new ParticleFairy(this));
|
addGadget(new ParticleFairy(this));
|
||||||
addGadget(new ParticleLegend(this));
|
addGadget(new ParticleLegend(this));
|
||||||
addGadget(new ParticleFrostLord(this));
|
addGadget(new ParticleFrostLord(this));
|
||||||
@ -192,7 +290,17 @@ public class GadgetManager extends MiniPlugin
|
|||||||
addGadget(new ParticleCoalFumes(this));
|
addGadget(new ParticleCoalFumes(this));
|
||||||
addGadget(new ParticlePartyTime(this));
|
addGadget(new ParticlePartyTime(this));
|
||||||
addGadget(new ParticleHeart(this));
|
addGadget(new ParticleHeart(this));
|
||||||
addGadget(new ParticleDemonsWings(this));
|
addGadget(new ParticleEmerald(this));
|
||||||
|
addGadget(new ParticleWingsDemons(this));
|
||||||
|
addGadget(new ParticleEnchant(this));
|
||||||
|
addGadget(new ParticleRain(this));
|
||||||
|
addGadget(new ParticleBlood(this));
|
||||||
|
addGadget(new ParticleMusic(this));
|
||||||
|
addGadget(new ParticleWingsAngel(this));
|
||||||
|
addGadget(new ParticleWingsInfernal(this));
|
||||||
|
addGadget(new ParticleWingsPixie(this));
|
||||||
|
addGadget(new ParticleYinYang(this));
|
||||||
|
|
||||||
|
|
||||||
// Arrow Trails
|
// Arrow Trails
|
||||||
addGadget(new ArrowTrailFrostLord(this));
|
addGadget(new ArrowTrailFrostLord(this));
|
||||||
@ -200,6 +308,12 @@ public class GadgetManager extends MiniPlugin
|
|||||||
addGadget(new ArrowTrailCandyCane(this));
|
addGadget(new ArrowTrailCandyCane(this));
|
||||||
addGadget(new ArrowTrailConfetti(this));
|
addGadget(new ArrowTrailConfetti(this));
|
||||||
addGadget(new ArrowTrailCupid(this));
|
addGadget(new ArrowTrailCupid(this));
|
||||||
|
addGadget(new ArrowTrailEmerald(this));
|
||||||
|
addGadget(new ArrowTrailShadow(this));
|
||||||
|
addGadget(new ArrowTrailEnchant(this));
|
||||||
|
addGadget(new ArrowTrailStorm(this));
|
||||||
|
addGadget(new ArrowTrailBlood(this));
|
||||||
|
addGadget(new ArrowTrailMusic(this));
|
||||||
|
|
||||||
// Death Effect
|
// Death Effect
|
||||||
addGadget(new DeathFrostLord(this));
|
addGadget(new DeathFrostLord(this));
|
||||||
@ -207,6 +321,12 @@ public class GadgetManager extends MiniPlugin
|
|||||||
addGadget(new DeathCandyCane(this));
|
addGadget(new DeathCandyCane(this));
|
||||||
addGadget(new DeathPinataBurst(this));
|
addGadget(new DeathPinataBurst(this));
|
||||||
addGadget(new DeathCupidsBorkenHeart(this));
|
addGadget(new DeathCupidsBorkenHeart(this));
|
||||||
|
addGadget(new DeathEmerald(this));
|
||||||
|
addGadget(new DeathShadow(this));
|
||||||
|
addGadget(new DeathEnchant(this));
|
||||||
|
addGadget(new DeathStorm(this));
|
||||||
|
addGadget(new DeathBlood(this));
|
||||||
|
addGadget(new DeathMusic(this));
|
||||||
|
|
||||||
// Double Jump
|
// Double Jump
|
||||||
addGadget(new DoubleJumpFrostLord(this));
|
addGadget(new DoubleJumpFrostLord(this));
|
||||||
@ -214,6 +334,12 @@ public class GadgetManager extends MiniPlugin
|
|||||||
addGadget(new DoubleJumpCandyCane(this));
|
addGadget(new DoubleJumpCandyCane(this));
|
||||||
addGadget(new DoubleJumpFirecracker(this));
|
addGadget(new DoubleJumpFirecracker(this));
|
||||||
addGadget(new DoubleJumpCupidsWings(this));
|
addGadget(new DoubleJumpCupidsWings(this));
|
||||||
|
addGadget(new DoubleJumpEmerald(this));
|
||||||
|
addGadget(new DoubleJumpShadow(this));
|
||||||
|
addGadget(new DoubleJumpEnchant(this));
|
||||||
|
addGadget(new DoubleJumpStorm(this));
|
||||||
|
addGadget(new DoubleJumpBlood(this));
|
||||||
|
addGadget(new DoubleJumpMusic(this));
|
||||||
|
|
||||||
// Hat
|
// Hat
|
||||||
addGadget(new HatSanta(this));
|
addGadget(new HatSanta(this));
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
|
||||||
|
public class ArrowTrailBlood extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ArrowTrailBlood(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Bloody Arrows",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Arrows soaking in blood, freshly pulled out from your enemies corpse", LineFormat.LORE),
|
||||||
|
1, Material.REDSTONE, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, arrow.getLocation(), null, 0f, 1, ViewDist.LONG);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.REDSTONE_BLOCK, 0), arrow.getLocation(), null, 0.05f, 3, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, arrow.getLocation(), 0.4f, 0.4f, 0.4f, 0f, 20, ViewDist.LONG);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.REDSTONE_BLOCK, 0), arrow.getLocation(), 0.1f, 0.1f, 0.1f, 0.25f, 60, ViewDist.LONG);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilAlg;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
|
||||||
|
public class ArrowTrailEmerald extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ArrowTrailEmerald(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Green Arrows",
|
||||||
|
UtilText.splitLineToArray("Shoot swirly green arrows", LineFormat.LORE),
|
||||||
|
1, Material.EMERALD, (byte)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
Vector v = arrow.getVelocity();
|
||||||
|
Vector up = UtilAlg.getUp(v);
|
||||||
|
Vector left = UtilAlg.getLeft(v);
|
||||||
|
|
||||||
|
Location loc = arrow.getLocation();
|
||||||
|
|
||||||
|
double amount = 2;
|
||||||
|
double ticks = 15;
|
||||||
|
for(int i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
double rad = Math.PI*2.0;
|
||||||
|
rad += i/amount * rad;
|
||||||
|
rad += Math.PI*2*(arrow.getTicksLived()%ticks)/ticks;
|
||||||
|
double l = -Math.sin(rad);
|
||||||
|
double u = Math.cos(rad);
|
||||||
|
|
||||||
|
Vector vel = v.clone().add(up.clone().multiply(u)).add(left.clone().multiply(l));
|
||||||
|
vel.multiply(0.4);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.HAPPY_VILLAGER, loc.clone().add(vel), vel, 1f, 0, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.HAPPY_VILLAGER, arrow.getLocation(), 0.35f, 0.35f, 0.35f, 1f, 15, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class ArrowTrailEnchant extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private Map<Arrow, Long> _arrowMap = new HashMap<>();
|
||||||
|
|
||||||
|
public ArrowTrailEnchant(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Smart Arrows",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Arrows so smart that they can't be bothered with helping you hit your target", LineFormat.LORE),
|
||||||
|
1, Material.BOOK, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
Vector v = arrow.getVelocity();
|
||||||
|
double l = v.lengthSquared();
|
||||||
|
v.multiply(-1/l);
|
||||||
|
for(int i = 0; i < l; i++) {
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, arrow.getLocation().add(v.clone().multiply(i+1)), null, 1, 0, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
_arrowMap.put(arrow, System.currentTimeMillis() + 2000);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
for (Iterator<Entry<Arrow, Long>> it = _arrowMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Arrow, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Location loc = e.getKey().getLocation().add(0, 1, 0);
|
||||||
|
for(double d = 0; d < Math.PI*2; d += Math.PI/6) {
|
||||||
|
double x = Math.sin(d);
|
||||||
|
double z = Math.cos(d);
|
||||||
|
Vector v = new Vector(x, -0.6, z).multiply(1.5);
|
||||||
|
// OUT
|
||||||
|
// UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone().add(-x*1.5, 0, -z*1.5), v, 1, 0, ViewDist.LONG);
|
||||||
|
// IN
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone(), v, 1, 0, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
|
||||||
|
public class ArrowTrailMusic extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ArrowTrailMusic(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Music Arrows",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Share your music with your friends using the new .arrow format", LineFormat.LORE),
|
||||||
|
1, Material.GREEN_RECORD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
|
||||||
|
float d = arrow.getTicksLived()%25;
|
||||||
|
d /= 24f;
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, arrow.getLocation(), d, 0, 0, 1, 0, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, arrow.getLocation(), 0.5f, 0.3f, 0.5f, 1, 5, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
|
||||||
|
public class ArrowTrailShadow extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ArrowTrailShadow(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Shadow Arrows",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Very very dark arrows", LineFormat.LORE),
|
||||||
|
1, Material.COAL, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
// if(!(arrow.getShooter() instanceof Player)) return;
|
||||||
|
// Player player = (Player) arrow.getShooter();
|
||||||
|
// if(getSet() == null || !getSet().isActive(player)) return;
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.SMOKE, arrow.getLocation(), null, 0.1f, 3, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, arrow.getLocation(), 0.3f, 0.3f, 0.3f , 0, 5, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.arrowtrail;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ArrowEffectGadget;
|
||||||
|
|
||||||
|
public class ArrowTrailStorm extends ArrowEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ArrowTrailStorm(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Rain Arrows",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Take your sadness to new hights and ranges", LineFormat.LORE),
|
||||||
|
1, Material.INK_SACK, (byte) 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTrail(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.SPLASH, arrow.getLocation(), 0.0f, 0.0f, 0.0f, 0.3f, 10, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doHitEffect(Arrow arrow)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.SPLASH, arrow.getLocation(), 0.4f, 0.4f, 0.4f, 0.7f, 160, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
|
||||||
|
public class DeathBlood extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DeathBlood(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Gory Blood Death",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Dye in the nastiest and bloodiest way possible. Soak your enemies in your blood every time you die!", LineFormat.LORE),
|
||||||
|
1, Material.REDSTONE, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setItem(Material.REDSTONE_BLOCK, (byte) 0);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, player.getLocation(), 0.4f, 0.4f, 0.4f, 0f, 20, ViewDist.LONG);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.REDSTONE_BLOCK, 0), player.getLocation(), 0.1f, 0.1f, 0.1f, 0.25f, 60, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
|
||||||
|
public class DeathEmerald extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DeathEmerald(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Green Death",
|
||||||
|
UtilText.splitLineToArray(C.cGreen + "I might be dead, but at least I got emeralds", LineFormat.LORE),
|
||||||
|
1, Material.EMERALD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setItem(Material.EMERALD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class DeathEnchant extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private Map<Location, Long> _locationMap = new HashMap<>();
|
||||||
|
|
||||||
|
public DeathEnchant(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Death of Wisdom",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Only a fool would continue fighting when he knows he have lost. Die with some cool and smart particles instead ;)", LineFormat.LORE),
|
||||||
|
1, Material.BOOK, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setItem(Material.BOOK, (byte)0);
|
||||||
|
_locationMap.put(event.getLocation().clone(), System.currentTimeMillis() + 1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
for (Iterator<Entry<Location, Long>> it = _locationMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Location, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Location loc = e.getKey().clone().add(0, 1, 0);
|
||||||
|
for(double d = 0; d < Math.PI*2; d += Math.PI/6) {
|
||||||
|
double x = Math.sin(d);
|
||||||
|
double z = Math.cos(d);
|
||||||
|
Vector v = new Vector(x, -0.6, z).multiply(1.5);
|
||||||
|
// OUT
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone().add(-x*1.5, 0, -z*1.5), v, 1, 0, ViewDist.LONG);
|
||||||
|
// IN
|
||||||
|
// UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone(), v, 1, 0, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class DeathMusic extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private Map<Location, Long> _playerMap = new HashMap<>();
|
||||||
|
|
||||||
|
public DeathMusic(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Musical Death",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "The body might die, but the music lives on!", LineFormat.LORE),
|
||||||
|
1, Material.GREEN_RECORD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
_playerMap.put(player.getLocation(), System.currentTimeMillis() + 1250);
|
||||||
|
_playerMap.put(player.getLocation().add(0, 0.9, 0), System.currentTimeMillis() + 1250);
|
||||||
|
_playerMap.put(player.getLocation().add(0, 1.8, 0), System.currentTimeMillis() + 1250);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
if(event.getTick()%2 == 1) return;
|
||||||
|
|
||||||
|
for(Iterator<Entry<Location, Long>> it = _playerMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Location, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
long diff = e.getValue()-System.currentTimeMillis();
|
||||||
|
double d = diff/1250.0;
|
||||||
|
|
||||||
|
int amount = 4;
|
||||||
|
|
||||||
|
double rad = Math.PI * 2 * d;
|
||||||
|
|
||||||
|
|
||||||
|
double step = Math.PI * 2;
|
||||||
|
step /= amount;
|
||||||
|
|
||||||
|
for(int i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
double rad2 = rad + step * i;
|
||||||
|
|
||||||
|
double x = Math.sin(rad2) * d * 1.3;
|
||||||
|
double z = Math.cos(rad2) * d * 1.3;
|
||||||
|
|
||||||
|
Location loc = e.getKey().clone().add(x, 0, z);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, loc, new Vector(d, 0, 0), 1, 0, ViewDist.NORMAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
|
||||||
|
public class DeathShadow extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DeathShadow(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Shadow Death",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Disappear in a cloud of smoke", LineFormat.LORE),
|
||||||
|
1, Material.COAL, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation().add(0, 0.5, 0), 0.1f, 0.5f, 0.1f, 0, 50, ViewDist.NORMAL);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation(), 0.5f, 0.0f, 0.5f, 0, 50, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.death;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.blood.BloodEvent;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DeathEffectGadget;
|
||||||
|
|
||||||
|
public class DeathStorm extends DeathEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DeathStorm(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Gloomy Death",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Is your death not sad enugh? Make it even more sad by adding some rainy weather too it!", LineFormat.LORE),
|
||||||
|
1, Material.INK_SACK, (byte) 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlood(Player player, BloodEvent event)
|
||||||
|
{
|
||||||
|
event.setItem(Material.INK_SACK, (byte) 4);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.SPLASH, player.getLocation().add(0, 0.9, 0), 0.6f, 0.9f, 0.6f, 0.6f, 100, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
|
||||||
|
public class DoubleJumpBlood extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DoubleJumpBlood(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Bloody Leap",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Oh, I gotta leap. No time to bursh of the enemies blood!", LineFormat.LORE),
|
||||||
|
1, Material.REDSTONE, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, player.getLocation(), 0.5f, 0.5f, 0.5f, 0f, 40, ViewDist.LONG);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.REDSTONE_BLOCK, 0), player.getLocation(), 0.1f, 0.1f, 0.1f, 0.25f, 100, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilAlg;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class DoubleJumpEmerald extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private HashMap<Player, Long> _players = new HashMap<>();
|
||||||
|
|
||||||
|
public DoubleJumpEmerald(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Green Jump",
|
||||||
|
UtilText.splitLineToArray(C.cGreen + "Oh, some just released a big one...", LineFormat.LORE),
|
||||||
|
1, Material.EMERALD, (byte)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
_players.put(player, System.currentTimeMillis() + 500);
|
||||||
|
float r = 0.5f;
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.HAPPY_VILLAGER, player.getLocation(), r, r, r, 0, 20, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
for (Iterator<Entry<Player, Long>> it = _players.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Player, Long> e = it.next();
|
||||||
|
if(e.getValue() < System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
double diff = e.getValue()-System.currentTimeMillis();
|
||||||
|
double r = (diff + 100)/400;
|
||||||
|
|
||||||
|
Vector v = e.getKey().getVelocity();
|
||||||
|
Vector up = UtilAlg.getUp(v);
|
||||||
|
Vector left = UtilAlg.getLeft(v);
|
||||||
|
|
||||||
|
Location loc = e.getKey().getLocation();
|
||||||
|
|
||||||
|
double amount = 3;
|
||||||
|
double ticks = 15;
|
||||||
|
for(int i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
double rad = Math.PI*2.0;
|
||||||
|
rad += i/amount * rad;
|
||||||
|
rad += Math.PI*2*(e.getKey().getTicksLived()%ticks)/ticks;
|
||||||
|
double l = -Math.sin(rad);
|
||||||
|
double u = Math.cos(rad);
|
||||||
|
|
||||||
|
Vector vel = v.clone().add(up.clone().multiply(u)).add(left.clone().multiply(l));
|
||||||
|
vel.multiply(r);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.HAPPY_VILLAGER, loc.clone().add(vel), vel, 1f, 0, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class DoubleJumpEnchant extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private Map<Location, Long> _locationMap = new HashMap<>();
|
||||||
|
private Map<Player, Long> _playerMap = new HashMap<>();
|
||||||
|
|
||||||
|
public DoubleJumpEnchant(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Leap of Wisdom",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Lett your widowm aid you in every leap you take", LineFormat.LORE),
|
||||||
|
1, Material.BOOK, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
_locationMap.put(player.getLocation(), System.currentTimeMillis() + 1500);
|
||||||
|
_playerMap.put(player, System.currentTimeMillis() + 1100);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
for (Iterator<Entry<Location, Long>> it = _locationMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Location, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Location loc = e.getKey().clone().add(0, 1, 0);
|
||||||
|
for(double d = 0; d < Math.PI*2; d += Math.PI/6) {
|
||||||
|
double x = Math.sin(d);
|
||||||
|
double z = Math.cos(d);
|
||||||
|
Vector v = new Vector(x, -0.6, z).multiply(1.5);
|
||||||
|
// OUT
|
||||||
|
// UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone().add(-x*1.5, 0, -z*1.5), v, 1, 0, ViewDist.LONG);
|
||||||
|
// IN
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, loc.clone(), v, 1, 0, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Iterator<Entry<Player, Long>> it = _playerMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Player, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
long diff = e.getValue()-System.currentTimeMillis();
|
||||||
|
float r = diff/2000.0f;
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.ENCHANTMENT_TABLE, e.getKey().getLocation(), r, r, r, 0, 10, ViewDist.LONGER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,20 +1,21 @@
|
|||||||
package mineplex.core.gadget.gadgets.doublejump;
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
import org.bukkit.Color;
|
|
||||||
import org.bukkit.FireworkEffect.Type;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.LineFormat;
|
import mineplex.core.common.util.LineFormat;
|
||||||
import mineplex.core.common.util.UtilFirework;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
import mineplex.core.common.util.UtilText;
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.gadget.GadgetManager;
|
import mineplex.core.gadget.GadgetManager;
|
||||||
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
|
||||||
public class DoubleJumpFirecracker extends DoubleJumpEffectGadget
|
public class DoubleJumpFirecracker extends DoubleJumpEffectGadget
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private byte[] _data = new byte[]{1,2,4,5,6,9,10,11,12,13,14,15};
|
||||||
|
|
||||||
public DoubleJumpFirecracker(GadgetManager manager)
|
public DoubleJumpFirecracker(GadgetManager manager)
|
||||||
{
|
{
|
||||||
@ -26,7 +27,10 @@ public class DoubleJumpFirecracker extends DoubleJumpEffectGadget
|
|||||||
@Override
|
@Override
|
||||||
public void doEffect(Player player)
|
public void doEffect(Player player)
|
||||||
{
|
{
|
||||||
UtilFirework.playFirework(player.getLocation(), Type.BALL, Color.fromRGB(UtilMath.r(255*255*255)), false, false);
|
for(byte data : _data) {
|
||||||
|
String particle = ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, data);
|
||||||
|
UtilParticle.PlayParticleToAll(particle, player.getLocation(), null, 0.3f, 15, ViewDist.LONGER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class DoubleJumpMusic extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private Map<Location, Long> _playerMap = new HashMap<>();
|
||||||
|
|
||||||
|
public DoubleJumpMusic(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Musical Leap",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Take your leaps and dance moves to the next level with.", LineFormat.LORE),
|
||||||
|
1, Material.GREEN_RECORD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
_playerMap.put(player.getLocation(), System.currentTimeMillis() + 1250);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onUpdate(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
if(event.getTick()%2 == 1) return;
|
||||||
|
|
||||||
|
for(Iterator<Entry<Location, Long>> it = _playerMap.entrySet().iterator(); it.hasNext();)
|
||||||
|
{
|
||||||
|
Entry<Location, Long> e = it.next();
|
||||||
|
if(e.getValue() <= System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
it.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
long diff = e.getValue()-System.currentTimeMillis();
|
||||||
|
double d = 1 - diff/1250.0;
|
||||||
|
|
||||||
|
int amount = 4;
|
||||||
|
|
||||||
|
double rad = Math.PI * 2 * d;
|
||||||
|
|
||||||
|
|
||||||
|
double step = Math.PI * 2;
|
||||||
|
step /= amount;
|
||||||
|
|
||||||
|
for(int i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
double rad2 = rad + step * i;
|
||||||
|
|
||||||
|
double x = Math.sin(rad2) * d * 1.3;
|
||||||
|
double z = Math.cos(rad2) * d * 1.3;
|
||||||
|
|
||||||
|
Location loc = e.getKey().clone().add(x, 0, z);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, loc, new Vector(d, 0, 0), 1, 0, ViewDist.NORMAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
|
||||||
|
public class DoubleJumpShadow extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DoubleJumpShadow(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Shadow Leap",
|
||||||
|
UtilText.splitLineToArray("Lead out of the shadows", LineFormat.LORE),
|
||||||
|
1, Material.COAL, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation(), 0.5f, 0.0f, 0.5f, 0, 20, ViewDist.LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.doublejump;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
|
||||||
|
|
||||||
|
public class DoubleJumpStorm extends DoubleJumpEffectGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public DoubleJumpStorm(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Wet Leap",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "Make a wet and sad leap. Perfekt for those off bridges.", LineFormat.LORE),
|
||||||
|
1, Material.INK_SACK, (byte) 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEffect(Player player)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.SPLASH, player.getLocation(), 0.4f, 0.3f, 0.4f, 1f, 160, ViewDist.NORMAL);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.CLOUD, player.getLocation(), 0.3f, 0.1f, 0.3f, 0.05f, 50, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -16,10 +16,10 @@ import mineplex.core.gadget.types.ParticleGadget;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
public class ParticleHelix extends ParticleGadget
|
public class ParticleBlood extends ParticleGadget
|
||||||
{
|
{
|
||||||
|
|
||||||
public ParticleHelix(GadgetManager manager)
|
public ParticleBlood(GadgetManager manager)
|
||||||
{
|
{
|
||||||
super(manager, "Blood Helix", UtilText.splitLineToArray(C.cGray + "Blood magic is very dangerous... but also very cool!", LineFormat.LORE),
|
super(manager, "Blood Helix", UtilText.splitLineToArray(C.cGray + "Blood magic is very dangerous... but also very cool!", LineFormat.LORE),
|
||||||
-2, Material.REDSTONE, (byte) 0);
|
-2, Material.REDSTONE, (byte) 0);
|
@ -15,23 +15,36 @@ import mineplex.core.gadget.types.ParticleGadget;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
public class ParticleGreen extends ParticleGadget
|
public class ParticleEmerald extends ParticleGadget
|
||||||
{
|
{
|
||||||
|
|
||||||
public ParticleGreen(GadgetManager manager)
|
public ParticleEmerald(GadgetManager manager)
|
||||||
{
|
{
|
||||||
super(manager, "Green Ring",
|
super(manager, "Emerald Twirl",
|
||||||
UtilText.splitLineToArray(C.cGray + "With these sparkles, you can sparkle while sparkle with CaptainSparklez!", LineFormat.LORE),
|
UtilText.splitLineToArray(C.cGray + "With these sparkles, you can sparkle while sparkle with CaptainSparklez!", LineFormat.LORE),
|
||||||
-2, Material.EMERALD, (byte) 0);
|
-2, Material.EMERALD, (byte) 0, "Green Ring");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playParticle(Player player, UpdateEvent event)
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.TICK) return;
|
if (event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
float x = (float) (Math.sin(player.getTicksLived() / 7d) * 1f);
|
int tick = player.getTicksLived();
|
||||||
float z = (float) (Math.cos(player.getTicksLived() / 7d) * 1f);
|
|
||||||
float y = (float) (Math.cos(player.getTicksLived() / 17d) * 1f + 1f);
|
float x = (float) (Math.sin(tick / 7d) * 1f);
|
||||||
|
float z = (float) (Math.cos(tick / 7d) * 1f);
|
||||||
|
float y = (float) (Math.cos(tick / 17d) * 1f + 1f);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1, ViewDist.NORMAL,
|
||||||
|
UtilServer.getPlayers());
|
||||||
|
|
||||||
|
if(getSet() == null || !getSet().isActive(player)) return;
|
||||||
|
|
||||||
|
tick += 17;
|
||||||
|
x = (float) (Math.sin(tick / 7d) * 1f);
|
||||||
|
z = (float) (Math.cos(tick / 7d) * 1f);
|
||||||
|
tick += 30;
|
||||||
|
y = (float) (Math.cos(tick / 17d) * 1f + 1f);
|
||||||
|
|
||||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1, ViewDist.NORMAL,
|
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(x, y, z), 0f, 0f, 0f, 0, 1, ViewDist.NORMAL,
|
||||||
UtilServer.getPlayers());
|
UtilServer.getPlayers());
|
@ -1,8 +1,5 @@
|
|||||||
package mineplex.core.gadget.gadgets.particle;
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -23,7 +20,6 @@ import mineplex.core.updater.event.UpdateEvent;
|
|||||||
|
|
||||||
public class ParticleHeart extends ParticleGadget
|
public class ParticleHeart extends ParticleGadget
|
||||||
{
|
{
|
||||||
private HashMap<Player, HashMap<Player, Location>> _target = new HashMap<Player, HashMap<Player, Location>>();
|
|
||||||
|
|
||||||
public ParticleHeart(GadgetManager manager)
|
public ParticleHeart(GadgetManager manager)
|
||||||
{
|
{
|
||||||
@ -59,8 +55,5 @@ public class ParticleHeart extends ParticleGadget
|
|||||||
public void quit(PlayerQuitEvent event)
|
public void quit(PlayerQuitEvent event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clean(Player player)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,95 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ParticleGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class ParticleMusic extends ParticleGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ParticleMusic(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Music", UtilText.splitLineToArray(C.cAqua + "And the beat goes?", LineFormat.LORE), 1, Material.GREEN_RECORD, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
|
{
|
||||||
|
boolean moving = Manager.isMoving(player);
|
||||||
|
UpdateType type = moving? UpdateType.FASTER : UpdateType.FAST;
|
||||||
|
|
||||||
|
if (event.getType() != type) return;
|
||||||
|
|
||||||
|
// float[] ds = new float[]{0,5/25f,12/25f,24/25f};
|
||||||
|
// float[] ds = new float[]{0,1/25f,2/25f,3/25f,4/25f,5/25f,6/25f,7/25f,8/25f,9/25f,10/25f,11/25f,12/25f,13/25f,14/25f,15/25f,16/25f,17/25f,18/25f,19/25f,20/25f,21/25f,22/25f,23/25f,24/25f};
|
||||||
|
// float[] ds = new float[]{0};
|
||||||
|
float[] ds = new float[]{0.24f, 0.25f, 0.26f, 0.56f, 0.58f, 0.6f, 0.91f};
|
||||||
|
|
||||||
|
int index = Math.abs(event.getTick()%(ds.length*10)/10);
|
||||||
|
float d = ds[index];
|
||||||
|
double rad = Math.PI * 2 * (Math.abs(event.getTick()%(20*10)/(10*20d)));
|
||||||
|
|
||||||
|
int amount = 4;
|
||||||
|
|
||||||
|
double step = Math.PI * 2;
|
||||||
|
step /= amount;
|
||||||
|
|
||||||
|
double r = 1;
|
||||||
|
|
||||||
|
if (moving)
|
||||||
|
{
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, player.getLocation(), d, 0, 0, 1, 0, ViewDist.NORMAL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int a = 0; a < amount; a++)
|
||||||
|
{
|
||||||
|
double rad2 = rad + step * a;
|
||||||
|
|
||||||
|
double x = Math.sin(rad2) * r;
|
||||||
|
double y = 1 + (Math.sin(rad2 * 11) + Math.cos(rad2 * 13)) / 4.0;
|
||||||
|
double z = Math.cos(rad2) * r;
|
||||||
|
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(x, y, z);
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.NOTE, loc, d, 0, 0, 1, 0, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getSet() != null && getSet().isActive(player))
|
||||||
|
{
|
||||||
|
double red = Math.sin(((float) d + 0.0F) * (float) Math.PI * 2.0F) * 0.65F + 0.35F;
|
||||||
|
double green = Math.sin(((float) d + 0.33333334F) * (float) Math.PI * 2.0F) * 0.65F + 0.35F;
|
||||||
|
double blue = Math.sin(((float) d + 0.6666667F) * (float) Math.PI * 2.0F) * 0.65F + 0.35F;
|
||||||
|
|
||||||
|
if(red == 0) red = 0.00001;
|
||||||
|
|
||||||
|
double step2 = Math.PI/12;
|
||||||
|
if(Manager.isMoving(player)) step2 = Math.PI/2;
|
||||||
|
|
||||||
|
for(double rad2 = 0; rad2 < Math.PI*2; rad2 += step2)
|
||||||
|
{
|
||||||
|
double x = Math.sin(rad2 + step) * r;
|
||||||
|
double z = Math.cos(rad2 + step) * r;
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(x, 1.25, z);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, loc, new Vector(red, green, blue), 1, 0, ViewDist.NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -52,7 +52,7 @@ public class ParticlePartyTime extends ParticleGadget
|
|||||||
{
|
{
|
||||||
if(event.getType() != UpdateType.TICK) return;
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
Location loc = player.getLocation().add(Math.random()*2-1, 3, Math.random()*2-1);
|
Location loc = player.getLocation().add(Math.random()*2-1, 2.3 + Math.random()*0.7, Math.random()*2-1);
|
||||||
|
|
||||||
List<Byte> list = Arrays.asList(_data);
|
List<Byte> list = Arrays.asList(_data);
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
@ -62,7 +62,9 @@ public class ParticlePartyTime extends ParticleGadget
|
|||||||
if(Manager.isMoving(player)) {
|
if(Manager.isMoving(player)) {
|
||||||
UtilParticle.PlayParticleToAll(particle, player.getLocation().add(0, 1, 0), null, 0.08f, 1, ViewDist.NORMAL);
|
UtilParticle.PlayParticleToAll(particle, player.getLocation().add(0, 1, 0), null, 0.08f, 1, ViewDist.NORMAL);
|
||||||
} else {
|
} else {
|
||||||
UtilParticle.PlayParticleToAll(particle, loc, null, 0.08f, 10, ViewDist.NORMAL);
|
UtilParticle.PlayParticleToAll(particle, loc, null, 0.08f, 10, ViewDist.NORMAL);
|
||||||
|
|
||||||
|
// if(UtilMath.r(10) == 0) loc.getWorld().playSound(loc, Sound.FIREWORK_BLAST, 0.1f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -86,8 +88,7 @@ public class ParticlePartyTime extends ParticleGadget
|
|||||||
String particle = ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, data);
|
String particle = ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, data);
|
||||||
UtilParticle.PlayParticleToAll(particle, spawnLoc, null, 0.08f, 30, ViewDist.NORMAL);
|
UtilParticle.PlayParticleToAll(particle, spawnLoc, null, 0.08f, 30, ViewDist.NORMAL);
|
||||||
|
|
||||||
|
loc.getWorld().playSound(loc, Sound.FIREWORK_BLAST, 0.1f, 1f);
|
||||||
spawnLoc.getWorld().playSound(spawnLoc, Sound.FIREWORK_LAUNCH, 0.05f, 0.4f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.shape.ShapeWings;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ParticleGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class ParticleWingsAngel extends ParticleGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private ShapeWings _wings = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,1,1), 1, 0, false);
|
||||||
|
private ShapeWings _wingsEdge = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,1,0.5), 1, 0, true);
|
||||||
|
|
||||||
|
public ParticleWingsAngel(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Angle Wings",
|
||||||
|
UtilText.splitLineToArray(C.cGray + "The wings of the angelic creature, made of long, soft feathers like the fur of a polar bear, thick and so soft it feels like a cloud. They are whiter than a soft coloured cloud on a bleating summers day, so white that a pure glow seems to emit from them.", LineFormat.LORE),
|
||||||
|
1, Material.NETHER_STAR, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
|
{
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
|
||||||
|
if (Manager.isMoving(player))
|
||||||
|
{
|
||||||
|
if (event.getType() == UpdateType.TICK)
|
||||||
|
{
|
||||||
|
_wings.displayParticle(loc);
|
||||||
|
_wingsEdge.displayParticle(loc);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.getType() == UpdateType.FAST) _wings.display(loc);
|
||||||
|
if (event.getType() == UpdateType.FAST) _wingsEdge.display(loc);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -3,6 +3,7 @@ package mineplex.core.gadget.gadgets.particle;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import mineplex.core.common.shape.ShapeWings;
|
import mineplex.core.common.shape.ShapeWings;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
@ -16,15 +17,16 @@ import mineplex.core.gadget.types.ParticleGadget;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
public class ParticleDemonsWings extends ParticleGadget
|
public class ParticleWingsDemons extends ParticleGadget
|
||||||
{
|
{
|
||||||
|
|
||||||
private ShapeWings _wings = new ShapeWings(ParticleType.RED_DUST.particleName, null, 0, 0);
|
private ShapeWings _wings = new ShapeWings(ParticleType.SMOKE.particleName, new Vector(0,-0.03,0), 1, 0, false);
|
||||||
|
|
||||||
public ParticleDemonsWings(GadgetManager manager)
|
public ParticleWingsDemons(GadgetManager manager)
|
||||||
{
|
{
|
||||||
super(manager, "Demon Wings", UtilText.splitLineToArray(C.cGray + "Even the shadows can't hide you from the demons", LineFormat.LORE), 1,
|
super(manager, "Demon Wings",
|
||||||
Material.COAL, (byte) 1);
|
UtilText.splitLineToArray(C.cGray + "Even the shadows can't hide you from the demons", LineFormat.LORE),
|
||||||
|
1, Material.COAL, (byte) 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -35,7 +37,7 @@ public class ParticleDemonsWings extends ParticleGadget
|
|||||||
if (Manager.isMoving(player))
|
if (Manager.isMoving(player))
|
||||||
{
|
{
|
||||||
if (event.getType() == UpdateType.FASTEST)
|
if (event.getType() == UpdateType.FASTEST)
|
||||||
UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, loc, 0.3f, 0.3f, 0.3f, 0, 10, ViewDist.NORMAL);
|
UtilParticle.PlayParticleToAll(ParticleType.SMOKE, loc, 0.3f, 0.2f, 0.3f, 0, 10, ViewDist.NORMAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.shape.ShapeWings;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ParticleGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class ParticleWingsInfernal extends ParticleGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private ShapeWings _wings = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,0,0), 1, 0, false);
|
||||||
|
private ShapeWings _wingsEdge = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,0.6,0), 1, 0, true);
|
||||||
|
|
||||||
|
public ParticleWingsInfernal(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Infernal Wings", UtilText.splitLineToArray(C.cGray + "The wings of the angelic creature, made of long, soft feathers like the fur of a polar bear, thick and so soft it feels like a cloud. They are whiter than a soft coloured cloud on a bleating summers day, so white that a pure glow seems to emit from them.", LineFormat.LORE),
|
||||||
|
1, Material.MAGMA_CREAM, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
|
{
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
|
||||||
|
if (Manager.isMoving(player))
|
||||||
|
{
|
||||||
|
if (event.getType() == UpdateType.TICK)
|
||||||
|
{
|
||||||
|
_wings.displayParticle(loc);
|
||||||
|
_wingsEdge.displayParticle(loc);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_wings = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,0,0), 1, 0, false);
|
||||||
|
_wingsEdge = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,0.6,0), 1, 0, true);
|
||||||
|
|
||||||
|
if (event.getType() == UpdateType.FAST) _wings.display(loc);
|
||||||
|
if (event.getType() == UpdateType.FAST) _wingsEdge.display(loc);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.shape.ShapeWings;
|
||||||
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
|
import mineplex.core.common.util.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ParticleGadget;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
|
public class ParticleWingsPixie extends ParticleGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
private ShapeWings _wings = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1/300d,1,1), 1, 0, false);
|
||||||
|
private ShapeWings _wingsEdge = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1,105/255d,180/255d), 1, 0, true);
|
||||||
|
|
||||||
|
public ParticleWingsPixie(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Pixie Wings", UtilText.splitLineToArray(C.cGray + "Pixie Wings. Much blue. Little Pink.", LineFormat.LORE),
|
||||||
|
1, Material.INK_SACK, (byte) 12);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
|
{
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
|
||||||
|
if (Manager.isMoving(player))
|
||||||
|
{
|
||||||
|
if (event.getType() == UpdateType.TICK)
|
||||||
|
{
|
||||||
|
_wings.displayParticle(loc);
|
||||||
|
_wingsEdge.displayParticle(loc);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.getType() == UpdateType.FAST) _wings.display(loc);
|
||||||
|
if (event.getType() == UpdateType.FAST) _wingsEdge.display(loc);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package mineplex.core.gadget.gadgets.particle;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.LineFormat;
|
||||||
|
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.UtilText;
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.types.ParticleGadget;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
|
import mineplex.core.recharge.RechargeData;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
import net.md_5.bungee.api.ChatColor;
|
||||||
|
import net.minecraft.server.v1_8_R3.MathHelper;
|
||||||
|
|
||||||
|
public class ParticleYinYang extends ParticleGadget
|
||||||
|
{
|
||||||
|
|
||||||
|
public ParticleYinYang(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Yin and Yang",
|
||||||
|
UtilText.splitLineToArray(ChatColor.GRAY + "Keeping the cosmos in balance since 800 B.C.", LineFormat.LORE),
|
||||||
|
1, Material.RECORD_9, (byte) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playParticle(Player player, UpdateEvent event)
|
||||||
|
{
|
||||||
|
if(event.getType() != UpdateType.TICK) return;
|
||||||
|
|
||||||
|
float step = (float) (Math.PI/30);
|
||||||
|
step *= event.getTick()%60;
|
||||||
|
|
||||||
|
float x = MathHelper.sin(step)*0.3f;
|
||||||
|
float y = 0;
|
||||||
|
float z = MathHelper.cos(step)*0.3f;
|
||||||
|
|
||||||
|
Location loc = player.getLocation().add(0, 0.2, 0);
|
||||||
|
|
||||||
|
RechargeData r = Recharge.Instance.Get(player).get("Yin and Yang Move");
|
||||||
|
|
||||||
|
if(Manager.isMoving(player))
|
||||||
|
{
|
||||||
|
long time = 50;
|
||||||
|
if(r != null)
|
||||||
|
{
|
||||||
|
time = Math.min(1000, r.GetRemaining() + 200);
|
||||||
|
}
|
||||||
|
Recharge.Instance.useForce(player, "Yin and Yang Move", time);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(r != null) {
|
||||||
|
float d = r.GetRemaining()/1000f;
|
||||||
|
y = 0.3f * d;
|
||||||
|
x *= 0.1 + ((1-d) * 0.9);
|
||||||
|
z *= 0.1 + ((1-d) * 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.FIREWORKS_SPARK, loc, new Vector(x, y, z), 1, 0, ViewDist.NORMAL);
|
||||||
|
UtilParticle.PlayParticleToAll(ParticleType.FIREWORKS_SPARK, loc, new Vector(-x, y, -z), 1, 0, ViewDist.NORMAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleBlood;
|
||||||
|
import mineplex.core.gadget.types.Gadget;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetBlood extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetBlood(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "The Vampire Set 2000", "Improves ???",
|
||||||
|
manager.getGadget(ArrowTrailBlood.class),
|
||||||
|
manager.getGadget(DeathBlood.class),
|
||||||
|
manager.getGadget(DoubleJumpBlood.class),
|
||||||
|
manager.getGadget(ParticleBlood.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleEmerald;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetEmerald extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetEmerald(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Emerald", "Improved Emerald Twirl",
|
||||||
|
manager.getGadget(ParticleEmerald.class),
|
||||||
|
manager.getGadget(ArrowTrailEmerald.class),
|
||||||
|
manager.getGadget(DeathEmerald.class),
|
||||||
|
manager.getGadget(DoubleJumpEmerald.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleEnchant;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetEnchant extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetEnchant(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Set of Wisdom", "Improves ???",
|
||||||
|
manager.getGadget(ArrowTrailEnchant.class),
|
||||||
|
manager.getGadget(DeathEnchant.class),
|
||||||
|
manager.getGadget(DoubleJumpEnchant.class),
|
||||||
|
manager.getGadget(ParticleEnchant.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleMusic;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetMusic extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetMusic(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Ultimate Music Collection Set", "Improves Particle",
|
||||||
|
manager.getGadget(ArrowTrailMusic.class),
|
||||||
|
manager.getGadget(DeathMusic.class),
|
||||||
|
manager.getGadget(DoubleJumpMusic.class),
|
||||||
|
manager.getGadget(ParticleMusic.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleFoot;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetShadow extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetShadow(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Shadow Set", "Improves arrow ???",
|
||||||
|
manager.getGadget(ArrowTrailShadow.class),
|
||||||
|
manager.getGadget(DeathShadow.class),
|
||||||
|
manager.getGadget(DoubleJumpShadow.class),
|
||||||
|
manager.getGadget(ParticleFoot.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package mineplex.core.gadget.set;
|
||||||
|
|
||||||
|
import mineplex.core.gadget.GadgetManager;
|
||||||
|
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.death.DeathStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm;
|
||||||
|
import mineplex.core.gadget.gadgets.particle.ParticleRain;
|
||||||
|
import mineplex.core.gadget.types.Gadget;
|
||||||
|
import mineplex.core.gadget.types.GadgetSet;
|
||||||
|
|
||||||
|
public class SetStorm extends GadgetSet
|
||||||
|
{
|
||||||
|
|
||||||
|
public SetStorm(GadgetManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Set of the Howling Winds", "Improves ???",
|
||||||
|
manager.getGadget(ArrowTrailStorm.class),
|
||||||
|
manager.getGadget(DeathStorm.class),
|
||||||
|
manager.getGadget(DoubleJumpStorm.class),
|
||||||
|
manager.getGadget(ParticleRain.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user