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

View File

@ -4445,6 +4445,7 @@ public class BukkitQuester implements Quester {
if (player == null) {
return;
}
compassTargetQuestId = null;
if (!canUseCompass()) {
return;
}
@ -4453,7 +4454,6 @@ public class BukkitQuester implements Quester {
if (defaultLocation == null) {
defaultLocation = player.getWorld().getSpawnLocation();
}
compassTargetQuestId = null;
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
*/
public void findCompassTarget() {
if (!canUseCompass()) {
// Here we apply this method to OPs by not checking #canUseCompass
if (getPlayer() == null || !getPlayer().hasPermission("quests.compass")) {
return;
}
for (final Quest quest : currentQuests.keySet()) {