mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 21:26:29 +01:00
Correct save order of rewards, fixes #1136
This commit is contained in:
parent
d706a06e69
commit
c0e30d11d0
@ -1789,22 +1789,22 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
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_MONEY) != null
|
rews.set("items", context.getSessionData(CK.REW_ITEMS) != null
|
||||||
? (Integer) context.getSessionData(CK.REW_MONEY) : null);
|
? (Integer) 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_ITEMS) != null
|
rews.set("quest-points", context.getSessionData(CK.REW_MONEY) != null
|
||||||
? (List<ItemStack>) context.getSessionData(CK.REW_ITEMS) : null);
|
? (List<ItemStack>) 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("permissions", context.getSessionData(CK.REW_COMMAND) != null
|
rews.set("commands", context.getSessionData(CK.REW_COMMAND) != null
|
||||||
? (List<String>)context.getSessionData(CK.REW_COMMAND) : null);
|
? (List<String>) context.getSessionData(CK.REW_COMMAND) : null);
|
||||||
rews.set("permission-worlds", context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) != null
|
rews.set("commands-override-display", context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) != null
|
||||||
? (List<String>)context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) : null);
|
? (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) : null);
|
||||||
rews.set("commands", context.getSessionData(CK.REW_PERMISSION) != null
|
rews.set("permissions", context.getSessionData(CK.REW_PERMISSION) != null
|
||||||
? (List<String>) context.getSessionData(CK.REW_PERMISSION) : null);
|
? (List<String>)context.getSessionData(CK.REW_PERMISSION) : null);
|
||||||
rews.set("commands-override-display", context.getSessionData(CK.REW_PERMISSION_WORLDS) != null
|
rews.set("permission-worlds", context.getSessionData(CK.REW_PERMISSION_WORLDS) != null
|
||||||
? (List<String>) context.getSessionData(CK.REW_PERMISSION_WORLDS) : null);
|
? (List<String>)context.getSessionData(CK.REW_PERMISSION_WORLDS) : null);
|
||||||
rews.set("mcmmo-skills", context.getSessionData(CK.REW_MCMMO_SKILLS) != null
|
rews.set("mcmmo-skills", context.getSessionData(CK.REW_MCMMO_SKILLS) != null
|
||||||
? (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS) : null);
|
? (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS) : null);
|
||||||
rews.set("mcmmo-levels", context.getSessionData(CK.REW_MCMMO_AMOUNTS) != null
|
rews.set("mcmmo-levels", context.getSessionData(CK.REW_MCMMO_AMOUNTS) != null
|
||||||
|
Loading…
Reference in New Issue
Block a user