mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 05:35:33 +01:00
Fixed multiplayer check
This commit is contained in:
parent
e45412ad25
commit
c7ebc22eed
@ -729,10 +729,13 @@ public class PlayerListener implements Listener {
|
|||||||
Quester quester = plugin.getQuester(damager.getUniqueId());
|
Quester quester = plugin.getQuester(damager.getUniqueId());
|
||||||
LinkedList<Quest> allQuests = plugin.getQuests();
|
LinkedList<Quest> allQuests = plugin.getQuests();
|
||||||
for (Quest quest : allQuests) {
|
for (Quest quest : allQuests) {
|
||||||
if ((quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "killMob"))
|
boolean multiplayer = !quest.getOptions().getRequireSameQuest();
|
||||||
|| !quest.getOptions().getRequireSameQuest()) {
|
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "killMob")) {
|
||||||
quester.killMob(quest, target.getLocation(), target.getType());
|
quester.killMob(quest, target.getLocation(), target.getType());
|
||||||
|
multiplayer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (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