mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +01:00
Avoid exception on /questadmin reload, fixes #714
This commit is contained in:
parent
9764a79437
commit
fa93771e56
@ -313,6 +313,9 @@ public class Quest {
|
||||
if (!plugin.getSettings().canUseCompass()) {
|
||||
return false;
|
||||
}
|
||||
if (quester == null) {
|
||||
return false;
|
||||
}
|
||||
if (nextStage == null) {
|
||||
return false;
|
||||
}
|
||||
@ -327,7 +330,7 @@ public class Quest {
|
||||
NPC npc = plugin.getDependencies().getCitizens().getNPCRegistry().getById(nextStage.itemDeliveryTargets.getFirst());
|
||||
targetLocation = npc.getStoredLocation();
|
||||
}
|
||||
if (targetLocation != null) {
|
||||
if (targetLocation != null && targetLocation.getWorld() != null) {
|
||||
if (targetLocation.getWorld().getName().equals(quester.getPlayer().getWorld().getName())) {
|
||||
quester.getPlayer().setCompassTarget(targetLocation);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user