mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-29 12:37:36 +01:00
Avoid error when using compass without any quests
This commit is contained in:
parent
81980c30ad
commit
8c9df06dbf
@ -3617,6 +3617,7 @@ public class Quester {
|
|||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
final Quest quest = plugin.getQuestById(list.get(index));
|
final Quest quest = plugin.getQuestById(list.get(index));
|
||||||
compassTargetQuestId = quest.getId();
|
compassTargetQuestId = quest.getId();
|
||||||
final Stage stage = getCurrentStage(quest);
|
final Stage stage = getCurrentStage(quest);
|
||||||
@ -3627,6 +3628,9 @@ public class Quester {
|
|||||||
.replace("<quest>", ChatColor.GOLD + quest.getName() + ChatColor.YELLOW));
|
.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