This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/xyz/xenondevs/particle/task Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 <modelVersion >4.0.0</modelVersion >
77 <groupId >xyz.xenondevs</groupId >
88 <artifactId >particle</artifactId >
9- <version >1.6.2 </version >
9+ <version >1.6.3 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >ParticleLib</name >
Original file line number Diff line number Diff line change 2929import xyz .xenondevs .particle .utils .ParticleUtils ;
3030import xyz .xenondevs .particle .utils .ReflectionUtils ;
3131
32- import java .util .ArrayList ;
3332import java .util .Collection ;
3433import java .util .List ;
3534import java .util .UUID ;
@@ -49,11 +48,6 @@ public final class TaskManager {
4948 */
5049 private final static TaskManager INSTANCE = new TaskManager ();
5150
52- /**
53- * A list of IDs of the currently running tasks
54- */
55- private final List <Integer > runningTasks = new ArrayList <>();
56-
5751 /**
5852 * Private constructor because this is a singleton class.
5953 */
@@ -72,7 +66,6 @@ public int startTask(ParticleTask task) {
7266 int taskId = Bukkit .getScheduler ().runTaskTimerAsynchronously (ReflectionUtils .PLUGIN , () -> {
7367 ParticleUtils .sendBulk (task .getPackets (), task .getTargetPlayers ());
7468 }, 0 , task .getTickDelay ()).getTaskId ();
75- runningTasks .add (taskId );
7669
7770 return taskId ;
7871 }
@@ -83,10 +76,7 @@ public int startTask(ParticleTask task) {
8376 * @param taskId the id of the task to be stopped.
8477 */
8578 public void stopTask (int taskId ) {
86- if (!runningTasks .contains (taskId ))
87- return ;
8879 Bukkit .getScheduler ().cancelTask (taskId );
89- runningTasks .remove (taskId );
9080 }
9181
9282 /**
You can’t perform that action at this time.
0 commit comments