Reduce count after all frames are ran
This commit is contained in:
1 parent
4a196e0522
commit
fec4aab3f0
1 file changed
+3
-2
@@ -26,9 +26,10 @@ public class FrameSpawnerLocation extends BukkitRunnable {
|
||||
public void run() {
|
||||
if (iterator.hasNext())
|
||||
iterator.next().spawn(location);
|
||||
else if (amount != 0)
|
||||
else if (amount != 0) {
|
||||
iterator = frames.iterator();
|
||||
else {
|
||||
amount--;
|
||||
} else {
|
||||
this.cancel();
|
||||
if (Config.DEBUG)
|
||||
Logger.info("Stopped repeating task due to end of frames");
|
||||
|
||||
Reference in new issue
Block a user