mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-02-11 03:29:53 +00:00
Fix bug with versions lower than 1.9
This commit is contained in:
parent
2d55d21a2a
commit
4afc2135b1
1 changed files with 13 additions and 1 deletions
|
@ -24,7 +24,11 @@ public class ReflectiveParticleSpawner extends ParticleSpawner {
|
||||||
if (particleEffect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA))
|
if (particleEffect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA))
|
||||||
throw new ParticleDataException("This particle effect requires additional data");
|
throw new ParticleDataException("This particle effect requires additional data");
|
||||||
|
|
||||||
new ParticlePacket(particleEffect, offsetX, offsetY, offsetZ, speed, amount, true, null).sendTo(center, this.getPlayersInRange(center, isLongRange, owner));
|
List<Player> players = this.getPlayersInRange(center, isLongRange, owner);
|
||||||
|
if (players.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
new ParticlePacket(particleEffect, offsetX, offsetY, offsetZ, speed, amount, true, null).sendTo(center, players);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,6 +36,10 @@ public class ReflectiveParticleSpawner extends ParticleSpawner {
|
||||||
if (!particleEffect.hasProperty(ParticleProperty.COLORABLE))
|
if (!particleEffect.hasProperty(ParticleProperty.COLORABLE))
|
||||||
throw new ParticleColorException("This particle effect is not colorable");
|
throw new ParticleColorException("This particle effect is not colorable");
|
||||||
|
|
||||||
|
List<Player> players = this.getPlayersInRange(center, isLongRange, owner);
|
||||||
|
if (players.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
new ParticlePacket(particleEffect, color, true).sendTo(center, this.getPlayersInRange(center, isLongRange, owner));
|
new ParticlePacket(particleEffect, color, true).sendTo(center, this.getPlayersInRange(center, isLongRange, owner));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +48,10 @@ public class ReflectiveParticleSpawner extends ParticleSpawner {
|
||||||
if (!particleEffect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA))
|
if (!particleEffect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA))
|
||||||
throw new ParticleDataException("This particle effect does not require additional data");
|
throw new ParticleDataException("This particle effect does not require additional data");
|
||||||
|
|
||||||
|
List<Player> players = this.getPlayersInRange(center, isLongRange, owner);
|
||||||
|
if (players.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
new ParticlePacket(particleEffect, offsetX, offsetY, offsetZ, speed, amount, true, spawnMaterial).sendTo(center, this.getPlayersInRange(center, isLongRange, owner));
|
new ParticlePacket(particleEffect, offsetX, offsetY, offsetZ, speed, amount, true, spawnMaterial).sendTo(center, this.getPlayersInRange(center, isLongRange, owner));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue