Check that current stage is not null before advancing stage, fixes #818

This commit is contained in:
PikaMug 2019-06-02 20:58:19 -04:00
parent e919554e59
commit b446041fa1

View File

@ -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()));