Fixed frames not properly repeating at the right speed

This commit is contained in:
2022-08-31 05:13:18 +02:00
parent 77dcd8862c
commit be97b45833
3 changed files with 36 additions and 19 deletions
@@ -48,8 +48,8 @@ public class ParticleSet {
public void run(Location location, Player player) {
if (tooSoon(player.getUniqueId()) || isVanished(player))
return;
FrameSpawnerLocation frameSpawnerLocation = new FrameSpawnerLocation(repeat, frames, location, player.getLocation().getYaw());
frameSpawnerLocation.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), frameDelay, repeatDelay);
FrameSpawnerLocation frameSpawnerLocation = new FrameSpawnerLocation(repeat, frames, frameDelay, location, player.getLocation().getYaw());
frameSpawnerLocation.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, repeatDelay);
}
public void run(Player player, PlayerSettings playerSettings) {
@@ -57,8 +57,8 @@ public class ParticleSet {
return;
if (Config.DEBUG)
Logger.info("Starting particle set % for %.", uniqueId, player.getName());
FrameSpawnerPlayer frameSpawnerPlayer = new FrameSpawnerPlayer(repeat, frames, player, playerSettings, aPartType, uniqueId);
frameSpawnerPlayer.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), frameDelay, repeatDelay);
FrameSpawnerPlayer frameSpawnerPlayer = new FrameSpawnerPlayer(repeat, frames, frameDelay, player, playerSettings, aPartType, uniqueId);
frameSpawnerPlayer.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, repeatDelay);
}
private boolean isVanished(Player player) {