diff --git a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java index a23a771c2c..c491cfc6af 100644 --- a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java +++ b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java @@ -40,6 +40,7 @@ import java.awt.event.ItemEvent; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -94,7 +95,7 @@ public class QuestOverviewPanel extends JPanel private final JButton collapseBtn = new JButton(); - private final List questStepPanelList = new ArrayList<>(); + private final List questStepPanelList = new CopyOnWriteArrayList<>(); public QuestOverviewPanel(QuestHelperPlugin questHelperPlugin, QuestManager questManager) { @@ -254,6 +255,7 @@ private JPanel makeDropdownPanel(JComboBox dropdown, String name) public void addQuest(QuestHelper quest, boolean isActive) { currentQuest = quest; + questStepPanelList.clear(); List steps = quest.getPanels(); QuestStep currentStep;