From e78a6733f41d7c8b39b0405e09d74c91c9346b31 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Sat, 5 Dec 2020 21:08:45 -0500 Subject: [PATCH] Null check quest requirements --- .../main/java/me/blackvein/quests/Quester.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/Quester.java b/main/src/main/java/me/blackvein/quests/Quester.java index 933123f4c..20f9ad667 100644 --- a/main/src/main/java/me/blackvein/quests/Quester.java +++ b/main/src/main/java/me/blackvein/quests/Quester.java @@ -746,15 +746,19 @@ public class Quester implements Comparable { } } for (final Quest q : reqs.getNeededQuests()) { - if (getCompletedQuests().contains(q)) { - finishedRequirements.add(ChatColor.GREEN + q.getName()); - } else { - unfinishedRequirements.add(ChatColor.GRAY + q.getName()); + if (q != null) { + if (getCompletedQuests().contains(q)) { + finishedRequirements.add(ChatColor.GREEN + q.getName()); + } else { + unfinishedRequirements.add(ChatColor.GRAY + q.getName()); + } } } for (final Quest q : reqs.getBlockQuests()) { - if (completedQuests.contains(q) || currentQuests.containsKey(q)) { - requirements.add(ChatColor.RED + quest.getName()); + if (q != null) { + if (completedQuests.contains(q) || currentQuests.containsKey(q)) { + requirements.add(ChatColor.RED + quest.getName()); + } } } for (final String s : reqs.getMcmmoSkills()) {