Package com.ordwen.odailyquests.quests
Class QuestsLoader
- All Implemented Interfaces:
IItemGetter,IQuestItem,IExternalItemGetter
Responsible for loading quests from configuration files.
This loader handles:
- Reading quest definitions from YAML files
- Validating configuration values
- Creating
BasicQuestobjects - Instantiating final quest implementations based on their type
- Loading quest rewards
- Reading placeholder-based conditions
Invalid configurations are reported through PluginLogger, and
the corresponding quests are skipped gracefully.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidloadQuests(org.bukkit.configuration.file.FileConfiguration file, List<AbstractQuest> quests, String fileName) Loads all quests defined in a configuration file.Methods inherited from class com.ordwen.odailyquests.quests.getters.QuestItemGetter
getCustomHead, getCustomModelDataItem, getItem, getItemsAdderItem, getItemStackFromMaterial, getMMOItemsItem, getNexoItem, getOraxenItem, loadCustomItem, loadPotionItemMethods inherited from class com.ordwen.odailyquests.commands.interfaces.playerinterface.items.getters.ItemGetter
getCustomModelDataItemMethods inherited from class com.ordwen.odailyquests.tools.externals.ExternalItemGetter
getCustomHead, getItemsAdderItem, getMMOItemsItem, getNexoItem, getOraxenItem
-
Constructor Details
-
QuestsLoader
public QuestsLoader()
-
-
Method Details
-
loadQuests
public void loadQuests(org.bukkit.configuration.file.FileConfiguration file, List<AbstractQuest> quests, String fileName) Loads all quests defined in a configuration file.For each quest entry:
- Reads base quest attributes
- Validates configuration
- Instantiates the concrete quest type
- Adds the quest to the provided list
Invalid quests are skipped, and their errors logged.
- Parameters:
file- the YAML file containing questsquests- the list to populate with loaded questsfileName- the file name used for logging
-