Added back no particle support, accidentally removed it on my latest push.

This commit is contained in:
Fernando Pettinelli 2021-12-10 17:54:04 -03:00
parent c50def934d
commit 931e680b10
2 changed files with 15 additions and 8 deletions

View File

@ -138,8 +138,11 @@ public class Hopper {
}
Location loc = location.clone().add(.5, .5, .5);
CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.getParticle(Settings.UPGRADE_PARTICLE_TYPE.getString()),
loc, 100, .5, .5, .5);
if (!Settings.UPGRADE_PARTICLE_TYPE.getString().trim().isEmpty()) {
CompatibleParticleHandler.spawnParticles(
CompatibleParticleHandler.ParticleType.getParticle(Settings.UPGRADE_PARTICLE_TYPE.getString()),
loc, 100, .5, .5, .5);
}
if (plugin.getLevelManager().getHighestLevel() != level) {
player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F);

View File

@ -92,14 +92,18 @@ public class ModuleBlockBreak extends Module {
float yy = (float) (0 + (Math.random() * .5));
float zz = (float) (0 + (Math.random() * .5));
Particle particle;
try {
particle = Particle.valueOf(Settings.BLOCKBREAK_PARTICLE.getString());
} catch (Exception e) {
particle = Particle.LAVA;
Particle particle = null;
if (!Settings.BLOCKBREAK_PARTICLE.getString().trim().isEmpty()) {
try {
particle = Particle.valueOf(Settings.BLOCKBREAK_PARTICLE.getString());
} 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;