Correct save order of rewards, part 2. Fixes #1137

This commit is contained in:
PikaMug 2020-03-26 18:08:30 -04:00
parent 7d5f7f5a70
commit e27cd25c04

View File

@ -1790,11 +1790,11 @@ public class QuestFactory implements ConversationAbandonedListener {
private void saveRewards(ConversationContext context, ConfigurationSection section) { private void saveRewards(ConversationContext context, ConfigurationSection section) {
ConfigurationSection rews = section.createSection("rewards"); ConfigurationSection rews = section.createSection("rewards");
rews.set("items", context.getSessionData(CK.REW_ITEMS) != null rews.set("items", context.getSessionData(CK.REW_ITEMS) != null
? (Integer) context.getSessionData(CK.REW_ITEMS) : null); ? (List<ItemStack>) context.getSessionData(CK.REW_ITEMS) : null);
rews.set("money", context.getSessionData(CK.REW_QUEST_POINTS) != null rews.set("money", context.getSessionData(CK.REW_QUEST_POINTS) != null
? (Integer) context.getSessionData(CK.REW_QUEST_POINTS) : null); ? (Integer) context.getSessionData(CK.REW_QUEST_POINTS) : null);
rews.set("quest-points", context.getSessionData(CK.REW_MONEY) != null rews.set("quest-points", context.getSessionData(CK.REW_MONEY) != null
? (List<ItemStack>) context.getSessionData(CK.REW_MONEY) : null); ? (Integer) context.getSessionData(CK.REW_MONEY) : null);
rews.set("exp", context.getSessionData(CK.REW_EXP) != null rews.set("exp", context.getSessionData(CK.REW_EXP) != null
? (Integer) context.getSessionData(CK.REW_EXP) : null); ? (Integer) context.getSessionData(CK.REW_EXP) : null);
rews.set("commands", context.getSessionData(CK.REW_COMMAND) != null rews.set("commands", context.getSessionData(CK.REW_COMMAND) != null