From b446041fa17f5ccc19bc5a912f586eddf6dc23bc Mon Sep 17 00:00:00 2001 From: PikaMug Date: Sun, 2 Jun 2019 20:58:19 -0400 Subject: [PATCH] Check that current stage is not null before advancing stage, fixes #818 --- main/src/main/java/me/blackvein/quests/Quest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/src/main/java/me/blackvein/quests/Quest.java b/main/src/main/java/me/blackvein/quests/Quest.java index f09cd5b76..f7200f0a9 100644 --- a/main/src/main/java/me/blackvein/quests/Quest.java +++ b/main/src/main/java/me/blackvein/quests/Quest.java @@ -165,6 +165,10 @@ public class Quest { * @param q Player to force */ public void nextStage(Quester q) { + if (q.getCurrentStage(this) == null) { + plugin.getLogger().severe("Current stage was null for quester " + q.getPlayer().getUniqueId()); + return; + } String stageCompleteMessage = q.getCurrentStage(this).completeMessage; if (stageCompleteMessage != null) { q.getPlayer().sendMessage(plugin.parseStringWithPossibleLineBreaks(stageCompleteMessage, this, q.getPlayer()));