mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-02-19 21:32:29 +01:00
Adds support for empty particles (-> no particles)
Having the particle name set to an empty string (`''`) now tells EpicHoppers that you don't want any particles
This commit is contained in:
parent
4e2213a6dc
commit
e6518ae91a
@ -125,8 +125,11 @@ public class Hopper {
|
|||||||
}
|
}
|
||||||
Location loc = location.clone().add(.5, .5, .5);
|
Location loc = location.clone().add(.5, .5, .5);
|
||||||
|
|
||||||
CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.getParticle(Settings.UPGRADE_PARTICLE_TYPE.getString()),
|
if (!Settings.UPGRADE_PARTICLE_TYPE.getString().trim().isEmpty()) {
|
||||||
loc, 100, .5, .5, .5);
|
CompatibleParticleHandler.spawnParticles(
|
||||||
|
CompatibleParticleHandler.ParticleType.getParticle(Settings.UPGRADE_PARTICLE_TYPE.getString()),
|
||||||
|
loc, 100, .5, .5, .5);
|
||||||
|
}
|
||||||
|
|
||||||
if (plugin.getLevelManager().getHighestLevel() != level) {
|
if (plugin.getLevelManager().getHighestLevel() != level) {
|
||||||
player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F);
|
player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F);
|
||||||
|
@ -92,14 +92,18 @@ public class ModuleBlockBreak extends Module {
|
|||||||
float yy = (float) (0 + (Math.random() * .5));
|
float yy = (float) (0 + (Math.random() * .5));
|
||||||
float zz = (float) (0 + (Math.random() * .5));
|
float zz = (float) (0 + (Math.random() * .5));
|
||||||
|
|
||||||
Particle particle;
|
Particle particle = null;
|
||||||
try {
|
if (!Settings.BLOCKBREAK_PARTICLE.getString().trim().isEmpty()) {
|
||||||
particle = Particle.valueOf(Settings.BLOCKBREAK_PARTICLE.getString());
|
try {
|
||||||
} catch (Exception e) {
|
particle = Particle.valueOf(Settings.BLOCKBREAK_PARTICLE.getString());
|
||||||
particle = Particle.LAVA;
|
} catch (Exception ignore) {
|
||||||
|
particle = Particle.LAVA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
above.getWorld().spawnParticle(particle, locationAbove, 15, xx, yy, zz);
|
if (particle != null) {
|
||||||
|
above.getWorld().spawnParticle(particle, locationAbove, 15, xx, yy, zz);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean waterlogged = false;
|
boolean waterlogged = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user