Class QuestTypeRegistry

java.lang.Object
java.util.AbstractMap<String,Class<? extends AbstractQuest>>
java.util.HashMap<String,Class<? extends AbstractQuest>>
com.ordwen.odailyquests.api.quests.QuestTypeRegistry
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Class<? extends AbstractQuest>>

public class QuestTypeRegistry extends HashMap<String,Class<? extends AbstractQuest>>
This class manages the registration and retrieval of quest types. It extends HashMap to store quest types, where the key is the type name and the value is the corresponding quest class.
See Also:
  • Constructor Details

    • QuestTypeRegistry

      public QuestTypeRegistry()
  • Method Details

    • registerQuestType

      public void registerQuestType(String type, Class<? extends AbstractQuest> questClass)
      Registers a new quest type by associating a type name with its corresponding quest class.
      Parameters:
      type - the name of the quest type to register
      questClass - the class of the quest that corresponds to the type
    • getMainClass

      public Class<? extends AbstractQuest> getMainClass(String type)
      Retrieves the quest class associated with the specified quest type.
      Parameters:
      type - the name of the quest type
      Returns:
      the Class of the quest associated with the type, or null if the type is not registered