mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Iterate quests of fellow questers for edge case, per #1570
This commit is contained in:
parent
81bddd246c
commit
dcb0d8f24e
@ -4042,14 +4042,15 @@ public class Quester implements Comparable<Quester> {
|
||||
fun.apply(q, quest);
|
||||
appliedQuestIDs.add(quest.getId());
|
||||
}
|
||||
} else {
|
||||
q.getCurrentQuests().forEach((otherQuest, i) -> {
|
||||
if (otherQuest.getStage(i).containsObjective(type)) {
|
||||
}
|
||||
q.getCurrentQuests().forEach((otherQuest, i) -> {
|
||||
if (otherQuest.getStage(i).containsObjective(type)) {
|
||||
if (!otherQuest.getOptions().canShareSameQuestOnly()) {
|
||||
fun.apply(q, otherQuest);
|
||||
appliedQuestIDs.add(otherQuest.getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
|
@ -76,13 +76,13 @@ public class BlockListener implements Listener {
|
||||
quester.breakBlock(quest, blockItemStack);
|
||||
|
||||
// Multiplayer
|
||||
if (!dispatchedQuestIDs.contains(quest.getId())) {
|
||||
dispatchedQuestIDs.addAll(quester.dispatchMultiplayerEverything(quest, breakType,
|
||||
(final Quester q, final Quest cq) -> {
|
||||
q.breakBlock(cq, blockItemStack);
|
||||
return null;
|
||||
}));
|
||||
}
|
||||
dispatchedQuestIDs.addAll(quester.dispatchMultiplayerEverything(quest, breakType,
|
||||
(final Quester q, final Quest cq) -> {
|
||||
if (!dispatchedQuestIDs.contains(cq.getId())) {
|
||||
q.breakBlock(cq, blockItemStack);
|
||||
}
|
||||
return null;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user