diff --git a/Challenge/src/main/java/de/fanta/challenge/challenges/ChallengeEvents/forcequest/ForceQuestChallengeEvent.java b/Challenge/src/main/java/de/fanta/challenge/challenges/ChallengeEvents/forcequest/ForceQuestChallengeEvent.java index cc638a5..6781427 100644 --- a/Challenge/src/main/java/de/fanta/challenge/challenges/ChallengeEvents/forcequest/ForceQuestChallengeEvent.java +++ b/Challenge/src/main/java/de/fanta/challenge/challenges/ChallengeEvents/forcequest/ForceQuestChallengeEvent.java @@ -410,9 +410,11 @@ } initPlayer(player); - - if (locationByPlayerList.containsKey(player.getUniqueId())) { - CoordsTargeter.addLocation(player.getUniqueId(), locationByPlayerList.get(player.getUniqueId()), false); + QuestType questType = playerQuest.get(player.getUniqueId()); + if (questType == QuestType.ForceLocation) { + if (locationByPlayerList.containsKey(player.getUniqueId())) { + CoordsTargeter.addLocation(player.getUniqueId(), locationByPlayerList.get(player.getUniqueId()), false); + } } } } @@ -422,14 +424,16 @@ if (isRunning()) { Player player = e.getPlayer(); - if (locationByPlayerList.containsKey(player.getUniqueId())) { - Location location = locationByPlayerList.get(player.getUniqueId()); - if (player.getLocation().getWorld() == location.getWorld()) { - CoordsTargeter.addLocation(player.getUniqueId(), location, false); - } else { - CoordsTargeter.removeLocation(player.getUniqueId()); + QuestType questType = playerQuest.get(player.getUniqueId()); + if (questType == QuestType.ForceLocation) { + if (locationByPlayerList.containsKey(player.getUniqueId())) { + Location location = locationByPlayerList.get(player.getUniqueId()); + if (player.getLocation().getWorld() == location.getWorld()) { + CoordsTargeter.addLocation(player.getUniqueId(), location, false); + } else { + CoordsTargeter.removeLocation(player.getUniqueId()); + } } - } } }