Interface NamespacedRegistry


public interface NamespacedRegistry
  • Method Details

    • getNamespace

      String getNamespace()
      Gets the namespace (plugin name) associated with the registry.
      Returns:
      the namespace
    • registerSkill

      void registerSkill(CustomSkill skill)
      Registers a custom skill in the registry.
      Parameters:
      skill - the CustomSkill
    • registerAbility

      void registerAbility(CustomAbility ability)
      Registers a custom ability in the registry.
      Parameters:
      ability - the CustomAbility
    • registerManaAbility

      void registerManaAbility(CustomManaAbility manaAbility)
      Registers a custom mana ability in the registry.
      Parameters:
      manaAbility - the CustomManaAbility
    • registerStat

      void registerStat(CustomStat stat)
      Registers a custom stat in the registry.
      Parameters:
      stat - the CustomStat
    • registerTrait

      void registerTrait(CustomTrait trait)
      Registers a custom trait in the registry.
      Parameters:
      trait - the CustomTrait
    • registerSourceType

      SourceType registerSourceType(String name, XpSourceParser<?> parser)
      Registers a source type in the registry.
      Parameters:
      name - The name of the source type in lowercase. Used as the key part of the NamespacedId of the source.
      parser - the parser for the source
      Returns:
      the created SourceType
    • getContentDirectory

      File getContentDirectory()
      Gets the directory from which configuration files are loaded for this namespace. This is usually the plugin data folder for the plugin associated with the namespace.
      Returns:
      the content directory
    • setContentDirectory

      void setContentDirectory(File contentDirectory)
      Sets the content directory from which configuration files are loaded for this namespace.
      Parameters:
      contentDirectory - the content directory
    • getMenuDirectory

      @NotNull @NotNull Optional<File> getMenuDirectory()
      Gets the directory where menus are loaded for this namespace. Menu files with the same name as the main plugin are merged together.
      Returns:
      the menu directory as an optional
    • setMenuDirectory

      void setMenuDirectory(File menuDirectory)
      Sets the directory where menus are loaded for this namespace. Menu files with the same name as the main plugin are merged together.
      Parameters:
      menuDirectory - the directory