Merge pull request #658 from BerndiVader/master

fix for https://github.com/FlyingPikachu/Quests/issues/655
This commit is contained in:
FlyingPikachu 2019-01-26 21:36:05 -05:00 committed by GitHub
commit 8784c8935b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<String>) cc.getSessionData(CK.REW_COMMAND);
if(cc.getSessionData(CK.REW_COMMAND) instanceof LinkedList<?>) {
commandRews = (LinkedList<String>) cc.getSessionData(CK.REW_COMMAND);
} else {
commandRews=new LinkedList<>();
commandRews.addAll((List<String>)cc.getSessionData(CK.REW_COMMAND));
}
}
if (cc.getSessionData(CK.REW_PERMISSION) != null) {
permRews = (LinkedList<String>) cc.getSessionData(CK.REW_PERMISSION);