mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-24 09:11:29 +01:00
Check for null variables, fixes #1052
This commit is contained in:
parent
56555dcab8
commit
c6bbff9bab
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user