Fixed frame delay

This commit is contained in:
2022-06-05 18:22:52 +02:00
parent 0a7b583424
commit 33d95226a7
3 changed files with 6 additions and 17 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, repeatDelay, frames, location, player.getLocation().getYaw());
frameSpawnerLocation.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, frameDelay);
FrameSpawnerLocation frameSpawnerLocation = new FrameSpawnerLocation(repeat, frames, location, player.getLocation().getYaw());
frameSpawnerLocation.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), frameDelay, 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, repeatDelay, frames, player, playerSettings, aPartType, uniqueId);
frameSpawnerPlayer.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, frameDelay);
FrameSpawnerPlayer frameSpawnerPlayer = new FrameSpawnerPlayer(repeat, frames, player, playerSettings, aPartType, uniqueId);
frameSpawnerPlayer.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), frameDelay, repeatDelay);
}
private boolean isVanished(Player player) {