mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-25 18:48:15 +01:00
Attempt to support both types of progress sharing
This commit is contained in:
parent
cad906965a
commit
e45412ad25
@ -727,11 +727,12 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Quester quester = plugin.getQuester(damager.getUniqueId());
|
Quester quester = plugin.getQuester(damager.getUniqueId());
|
||||||
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
LinkedList<Quest> allQuests = plugin.getQuests();
|
||||||
if (quester.containsObjective(quest, "killMob")) {
|
for (Quest quest : allQuests) {
|
||||||
|
if ((quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "killMob"))
|
||||||
|
|| !quest.getOptions().getRequireSameQuest()) {
|
||||||
quester.killMob(quest, target.getLocation(), target.getType());
|
quester.killMob(quest, target.getLocation(), target.getType());
|
||||||
|
|
||||||
// Multiplayer
|
|
||||||
quester.dispatchMultiplayerEverything(quest, "killMob", (Quester q) -> {
|
quester.dispatchMultiplayerEverything(quest, "killMob", (Quester q) -> {
|
||||||
q.killMob(quest, target.getLocation(), target.getType());
|
q.killMob(quest, target.getLocation(), target.getType());
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user