Attempt to support both types of progress sharing

This commit is contained in:
PikaMug 2019-09-14 01:33:09 -04:00
parent cad906965a
commit e45412ad25

View File

@ -727,11 +727,12 @@ public class PlayerListener implements Listener {
}
}
Quester quester = plugin.getQuester(damager.getUniqueId());
for (Quest quest : quester.getCurrentQuests().keySet()) {
if (quester.containsObjective(quest, "killMob")) {
LinkedList<Quest> allQuests = plugin.getQuests();
for (Quest quest : allQuests) {
if ((quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "killMob"))
|| !quest.getOptions().getRequireSameQuest()) {
quester.killMob(quest, target.getLocation(), target.getType());
// Multiplayer
quester.dispatchMultiplayerEverything(quest, "killMob", (Quester q) -> {
q.killMob(quest, target.getLocation(), target.getType());
return null;