From d5d1dbde48fec555fcd0e59f97c06dcf93ef0e39 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Sat, 28 Nov 2020 23:03:02 -0500 Subject: [PATCH] Correct improper saving of quest and quest block Requirements --- main/src/main/java/me/blackvein/quests/QuestFactory.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/QuestFactory.java b/main/src/main/java/me/blackvein/quests/QuestFactory.java index 52401f41a..df966842f 100644 --- a/main/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/main/src/main/java/me/blackvein/quests/QuestFactory.java @@ -22,6 +22,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.UUID; +import java.util.stream.Collectors; import org.bukkit.ChatColor; import org.bukkit.DyeColor; @@ -175,10 +176,12 @@ public class QuestFactory implements ConversationAbandonedListener { context.setSessionData(CK.REQ_ITEMS_REMOVE, reqs.getRemoveItems()); } if (reqs.getNeededQuests().isEmpty() == false) { - context.setSessionData(CK.REQ_QUEST, reqs.getNeededQuests()); + final List names = reqs.getNeededQuests().stream().map(Quest::getName).collect(Collectors.toList()); + context.setSessionData(CK.REQ_QUEST, names); } if (reqs.getBlockQuests().isEmpty() == false) { - context.setSessionData(CK.REQ_QUEST_BLOCK, reqs.getBlockQuests()); + final List names = reqs.getBlockQuests().stream().map(Quest::getName).collect(Collectors.toList()); + context.setSessionData(CK.REQ_QUEST_BLOCK, names); } if (reqs.getMcmmoSkills().isEmpty() == false) { context.setSessionData(CK.REQ_MCMMO_SKILLS, reqs.getMcmmoAmounts());