From 0d3448ea14aae7814945fa873e8dd4cc9db7fc91 Mon Sep 17 00:00:00 2001 From: PikaMug Date: Mon, 8 Jul 2019 14:04:18 -0400 Subject: [PATCH] Resolve issue when saving quests, fixes #840 --- main/src/main/java/me/blackvein/quests/QuestFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/QuestFactory.java b/main/src/main/java/me/blackvein/quests/QuestFactory.java index f587f52b9..5158f635a 100644 --- a/main/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/main/src/main/java/me/blackvein/quests/QuestFactory.java @@ -1358,10 +1358,10 @@ public class QuestFactory implements ConversationAbandonedListener { if (delay != null) { stage.set("delay", delay.intValue() / 1000); } - stage.set("delay-message", delayMessage.replace("\\n", "\n")); - stage.set("objective-override", overrideDisplay.replace("\\n", "\n")); - stage.set("start-message", startMessage.replace("\\n", "\n")); - stage.set("complete-message", completeMessage.replace("\\n", "\n")); + stage.set("delay-message", delayMessage == null ? delayMessage : delayMessage.replace("\\n", "\n")); + stage.set("objective-override", overrideDisplay == null ? overrideDisplay : overrideDisplay.replace("\\n", "\n")); + stage.set("start-message", startMessage == null ? startMessage : startMessage.replace("\\n", "\n")); + stage.set("complete-message", completeMessage == null ? completeMessage : completeMessage.replace("\\n", "\n")); } if (moneyRew != null || questPointsRew != null || itemRews != null && itemRews.isEmpty() == false || permRews != null && permRews.isEmpty() == false || expRew != null || commandRews != null && commandRews.isEmpty() == false || mcMMOSkillRews != null || RPGItemRews != null || heroesClassRews != null && heroesClassRews.isEmpty() == false || phatLootRews != null && phatLootRews.isEmpty() == false || customRews != null && customRews.isEmpty() == false) { ConfigurationSection rews = cs.createSection("rewards");