mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +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);
|
fun.apply(q, quest);
|
||||||
appliedQuestIDs.add(quest.getId());
|
appliedQuestIDs.add(quest.getId());
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
q.getCurrentQuests().forEach((otherQuest, i) -> {
|
q.getCurrentQuests().forEach((otherQuest, i) -> {
|
||||||
if (otherQuest.getStage(i).containsObjective(type)) {
|
if (otherQuest.getStage(i).containsObjective(type)) {
|
||||||
|
if (!otherQuest.getOptions().canShareSameQuestOnly()) {
|
||||||
fun.apply(q, otherQuest);
|
fun.apply(q, otherQuest);
|
||||||
appliedQuestIDs.add(otherQuest.getId());
|
appliedQuestIDs.add(otherQuest.getId());
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
|
@ -76,13 +76,13 @@ public class BlockListener implements Listener {
|
|||||||
quester.breakBlock(quest, blockItemStack);
|
quester.breakBlock(quest, blockItemStack);
|
||||||
|
|
||||||
// Multiplayer
|
// Multiplayer
|
||||||
if (!dispatchedQuestIDs.contains(quest.getId())) {
|
dispatchedQuestIDs.addAll(quester.dispatchMultiplayerEverything(quest, breakType,
|
||||||
dispatchedQuestIDs.addAll(quester.dispatchMultiplayerEverything(quest, breakType,
|
(final Quester q, final Quest cq) -> {
|
||||||
(final Quester q, final Quest cq) -> {
|
if (!dispatchedQuestIDs.contains(cq.getId())) {
|
||||||
q.breakBlock(cq, blockItemStack);
|
q.breakBlock(cq, blockItemStack);
|
||||||
return null;
|
}
|
||||||
}));
|
return null;
|
||||||
}
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user