From 9992256ce2a0246a40769446323fd6ed40f1621d Mon Sep 17 00:00:00 2001 From: BerndiVader Date: Sun, 27 Jan 2019 00:29:17 +0100 Subject: [PATCH] fix for https://github.com/FlyingPikachu/Quests/issues/655 --- src/main/java/me/blackvein/quests/QuestFactory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/blackvein/quests/QuestFactory.java b/src/main/java/me/blackvein/quests/QuestFactory.java index 418c4cefc..d9c3e7805 100644 --- a/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/src/main/java/me/blackvein/quests/QuestFactory.java @@ -883,7 +883,12 @@ public class QuestFactory implements ConversationAbandonedListener { expRew = (Integer) cc.getSessionData(CK.REW_EXP); } if (cc.getSessionData(CK.REW_COMMAND) != null) { - commandRews = (LinkedList) cc.getSessionData(CK.REW_COMMAND); + if(cc.getSessionData(CK.REW_COMMAND) instanceof LinkedList) { + commandRews = (LinkedList) cc.getSessionData(CK.REW_COMMAND); + } else { + commandRews=new LinkedList<>(); + commandRews.addAll((List)cc.getSessionData(CK.REW_COMMAND)); + } } if (cc.getSessionData(CK.REW_PERMISSION) != null) { permRews = (LinkedList) cc.getSessionData(CK.REW_PERMISSION);