Update target of Quest Compass for OP

This commit is contained in:
PikaMug 2024-01-01 17:53:34 -05:00
parent a587a0c1c0
commit 82de833b60
1 changed files with 3 additions and 2 deletions

View File

@ -4445,6 +4445,7 @@ public class BukkitQuester implements Quester {
if (player == null) { if (player == null) {
return; return;
} }
compassTargetQuestId = null;
if (!canUseCompass()) { if (!canUseCompass()) {
return; return;
} }
@ -4453,7 +4454,6 @@ public class BukkitQuester implements Quester {
if (defaultLocation == null) { if (defaultLocation == null) {
defaultLocation = player.getWorld().getSpawnLocation(); defaultLocation = player.getWorld().getSpawnLocation();
} }
compassTargetQuestId = null;
player.setCompassTarget(defaultLocation); player.setCompassTarget(defaultLocation);
} }
@ -4461,7 +4461,8 @@ public class BukkitQuester implements Quester {
* Update compass target to current stage of first available current quest, if possible * Update compass target to current stage of first available current quest, if possible
*/ */
public void findCompassTarget() { public void findCompassTarget() {
if (!canUseCompass()) { // Here we apply this method to OPs by not checking #canUseCompass
if (getPlayer() == null || !getPlayer().hasPermission("quests.compass")) {
return; return;
} }
for (final Quest quest : currentQuests.keySet()) { for (final Quest quest : currentQuests.keySet()) {