mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-22 17:17:38 +01:00
Check for Citizens before loading config values
This commit is contained in:
parent
3ce4b4fe53
commit
9538fba9b7
@ -2572,7 +2572,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
skipQuestProcess("Quest block \'" + questName + "\' is missing " + RED + "name:");
|
||||
}
|
||||
|
||||
if (config.contains("quests." + questName + ".npc-giver-id")) {
|
||||
if (citizens != null && config.contains("quests." + questName + ".npc-giver-id")) {
|
||||
if (CitizensAPI.getNPCRegistry().getById(config.getInt("quests." + questName + ".npc-giver-id")) != null) {
|
||||
|
||||
quest.npcStart = CitizensAPI.getNPCRegistry().getById(config.getInt("quests." + questName + ".npc-giver-id"));
|
||||
|
Loading…
Reference in New Issue
Block a user