diff --git a/bin/CrunchProjectiles/EntityProjectile.class b/bin/CrunchProjectiles/EntityProjectile.class index f3bce00..4bafa94 100644 Binary files a/bin/CrunchProjectiles/EntityProjectile.class and b/bin/CrunchProjectiles/EntityProjectile.class differ diff --git a/bin/CrunchProjectiles/ExplosiveProjectile.class b/bin/CrunchProjectiles/ExplosiveProjectile.class index edcdedc..4701b85 100644 Binary files a/bin/CrunchProjectiles/ExplosiveProjectile.class and b/bin/CrunchProjectiles/ExplosiveProjectile.class differ diff --git a/src/CrunchProjectiles/EntityProjectile.java b/src/CrunchProjectiles/EntityProjectile.java index 81d2d4f..beb8411 100644 --- a/src/CrunchProjectiles/EntityProjectile.java +++ b/src/CrunchProjectiles/EntityProjectile.java @@ -71,7 +71,9 @@ public class EntityProjectile implements CrunchProjectile{ if (PlaySound) { world.playSound(loc, this.SoundType, 20, 2); world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0); - PlaySound = false; + if (!DelayedFire) { + PlaySound = false; + } } } diff --git a/src/CrunchProjectiles/ExplosiveProjectile.java b/src/CrunchProjectiles/ExplosiveProjectile.java index 554b32d..039e34a 100644 --- a/src/CrunchProjectiles/ExplosiveProjectile.java +++ b/src/CrunchProjectiles/ExplosiveProjectile.java @@ -31,8 +31,11 @@ public class ExplosiveProjectile implements CrunchProjectile { public int DelayTime = 6; public Particle ParticleType = Particle.EXPLOSION_LARGE; public Sound SoundType = Sound.ENTITY_GENERIC_EXPLODE; + private boolean PlaySound = true; + @Override public void Shoot(Player player, Entity entity, Location loc, Float velocity) { + PlaySound = true; int baseDelay = 0; for (int i = 0; i < ProjectilesCount; i++) { if (DelayedFire) { @@ -63,12 +66,17 @@ public class ExplosiveProjectile implements CrunchProjectile { tnt.setVelocity(loc.getDirection().multiply(velocity)); } - + if (PlaySound) { + world.playSound(loc, this.SoundType, 20, 2); + world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0); + if (!DelayedFire) { + PlaySound = false; + } + } // MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.ARROW); // miscDisguise.setEntity(tnt); // miscDisguise.startDisguise(); - world.playSound(loc, this.SoundType, 20, 2); - world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0); + } private Vector Randomise() {