Disable particles if player turns them off

This commit is contained in:
Teriuihi 2022-01-13 23:44:30 +01:00
parent 5864918442
commit 1e70782c0d

View File

@ -42,7 +42,7 @@ public class FrameSpawnerPlayer extends BukkitRunnable {
return; return;
} }
ParticleSet activeParticleSet = playerSettings.getParticles(aPartType); ParticleSet activeParticleSet = playerSettings.getParticles(aPartType);
if (activeParticleSet == null || !activeParticleSet.getParticleId().equalsIgnoreCase(uniqueId)) { if (activeParticleSet == null || !activeParticleSet.getParticleId().equalsIgnoreCase(uniqueId) || playerSettings.hasActiveParticles()) {
this.cancel(); this.cancel();
if (Config.DEBUG) if (Config.DEBUG)
Logger.info("Stopped repeating task due to player switching/disabling particles."); Logger.info("Stopped repeating task due to player switching/disabling particles.");