diff --git a/main/src/main/java/me/blackvein/quests/Quester.java b/main/src/main/java/me/blackvein/quests/Quester.java index e6dbc49f8..4aab4773a 100644 --- a/main/src/main/java/me/blackvein/quests/Quester.java +++ b/main/src/main/java/me/blackvein/quests/Quester.java @@ -1186,6 +1186,9 @@ public class Quester { * @return true if quest contains specified objective */ public boolean containsObjective(Quest quest, String s) { + if (quest == null) { + return false; + } return getCurrentStage(quest).containsObjective(s); } diff --git a/main/src/main/java/me/blackvein/quests/tasks/NpcEffectThread.java b/main/src/main/java/me/blackvein/quests/tasks/NpcEffectThread.java index 9b7b12b45..a41d1c4e4 100644 --- a/main/src/main/java/me/blackvein/quests/tasks/NpcEffectThread.java +++ b/main/src/main/java/me/blackvein/quests/tasks/NpcEffectThread.java @@ -61,7 +61,7 @@ public class NpcEffectThread implements Runnable { * @param effectType Value of EnumParticle such as NOTE or SMOKE */ public void showEffect(Player player, NPC npc, String effectType) { - if (player == null || npc == null) { + if (player == null || npc == null || npc.getEntity() == null) { return; } if (plugin.getDependencies().getCitizens() != null) {