mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-28 20:18:32 +01:00
Avoid error when using compass without any quests
This commit is contained in:
parent
81980c30ad
commit
8c9df06dbf
@ -3617,15 +3617,19 @@ public class Quester {
|
|||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Quest quest = plugin.getQuestById(list.get(index));
|
if (list.size() > 0) {
|
||||||
compassTargetQuestId = quest.getId();
|
final Quest quest = plugin.getQuestById(list.get(index));
|
||||||
final Stage stage = getCurrentStage(quest);
|
compassTargetQuestId = quest.getId();
|
||||||
if (stage != null) {
|
final Stage stage = getCurrentStage(quest);
|
||||||
quest.updateCompass(Quester.this, stage);
|
if (stage != null) {
|
||||||
if (notify && getPlayer().isOnline()) {
|
quest.updateCompass(Quester.this, stage);
|
||||||
getPlayer().sendMessage(ChatColor.YELLOW + Lang.get(getPlayer(), "compassSet")
|
if (notify && getPlayer().isOnline()) {
|
||||||
.replace("<quest>", ChatColor.GOLD + quest.getName() + ChatColor.YELLOW));
|
getPlayer().sendMessage(ChatColor.YELLOW + Lang.get(getPlayer(), "compassSet")
|
||||||
|
.replace("<quest>", ChatColor.GOLD + quest.getName() + ChatColor.YELLOW));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
getPlayer().sendMessage(ChatColor.RED + Lang.get(getPlayer(), "journalNoQuests"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user