Fixed particle task.

This commit is contained in:
Brianna O'Keefe 2024-03-12 19:34:39 -05:00
parent 424f65b287
commit 91e99c5ba6
1 changed files with 8 additions and 2 deletions

View File

@ -19,17 +19,23 @@ public class ParticleTask extends BukkitRunnable {
private int amt;
private String typeName;
private ParticleType type;
private boolean hasStarted = false;
public ParticleTask(UltimateRepairing plugin) {
this.plugin = plugin;
}
public void start() {
if (isCancelled())
if (hasStarted && !isCancelled())
return;
reload();
runTaskTimerAsynchronously(plugin, 0L, 4L);
if (hasStarted)
run();
else
runTaskTimerAsynchronously(plugin, 0L, 4L);
hasStarted = true;
}
public void reload() {