Display objective overrides when taking quest, fixes #730

This commit is contained in:
BuildTools 2019-04-01 15:50:42 -04:00
parent 0137eedec8
commit 3a6637c38c

View File

@ -623,6 +623,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
*/
@SuppressWarnings("deprecation")
public void showObjectives(Quest quest, Quester quester, boolean ignoreOverrides) {
if (!ignoreOverrides) {
if (quester.getCurrentStage(quest) != null) {
if (quester.getCurrentStage(quest).objectiveOverride != null) {
quester.getPlayer().sendMessage(ChatColor.GREEN + quester.getCurrentStage(quest).objectiveOverride);
return;
}
}
}
if (quester.getQuestData(quest) == null) {
getLogger().warning("Quest data was null when showing objectives for " + quest.getName());
return;