mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fix ConcurrentModificationException with alchemyBrewTask.finishImmediately()
Fixes #1848
This commit is contained in:
parent
988006f913
commit
4b9d472f10
@ -1,6 +1,8 @@
|
||||
package com.gmail.nossr50.skills.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.block.BlockState;
|
||||
@ -61,7 +63,13 @@ public final class Alchemy {
|
||||
public static void finishAllBrews() {
|
||||
mcMMO.p.debug("Completing " + brewingStandMap.size() + " unfinished Alchemy brews.");
|
||||
|
||||
List<AlchemyBrewTask> toFinish = new ArrayList<AlchemyBrewTask>();
|
||||
|
||||
for (AlchemyBrewTask alchemyBrewTask : brewingStandMap.values()) {
|
||||
toFinish.add(alchemyBrewTask);
|
||||
}
|
||||
|
||||
for (AlchemyBrewTask alchemyBrewTask : toFinish) {
|
||||
alchemyBrewTask.finishImmediately();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user