mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +01:00
Catch error in #155
This commit is contained in:
parent
aca1bb211c
commit
d3156c6d0f
@ -78,7 +78,6 @@ public class NpcListener implements Listener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -887,12 +887,20 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void interactWithNPC(Quest quest, NPC n) {
|
public void interactWithNPC(Quest quest, NPC n) {
|
||||||
|
try {
|
||||||
if (getQuestData(quest).citizensInteracted.containsKey(n.getId())) {
|
if (getQuestData(quest).citizensInteracted.containsKey(n.getId())) {
|
||||||
if (getQuestData(quest).citizensInteracted.get(n.getId()) == false) {
|
if (getQuestData(quest).citizensInteracted.get(n.getId()) == false) {
|
||||||
getQuestData(quest).citizensInteracted.put(n.getId(), true);
|
getQuestData(quest).citizensInteracted.put(n.getId(), true);
|
||||||
finishObjective(quest, "talkToNPC", null, null, null, null, null, n, null, null, null, null);
|
finishObjective(quest, "talkToNPC", null, null, null, null, null, n, null, null, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
//Github ticket #155
|
||||||
|
plugin.getLogger().severe("An error has occurred with Quests. Please report on Github. Include the info below");
|
||||||
|
plugin.getLogger().severe("npc + id = " + n.getName() + " + " + n.getId());
|
||||||
|
plugin.getLogger().severe("citizensInteracted = " + getQuestData(quest).citizensInteracted.toString());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void killNPC(Quest quest, NPC n) {
|
public void killNPC(Quest quest, NPC n) {
|
||||||
|
Loading…
Reference in New Issue
Block a user