Interface NamespacedRegistry
public interface NamespacedRegistry
-
Method Summary
Modifier and TypeMethodDescriptionGets the directory from which configuration files are loaded for this namespace.Gets the namespace (plugin name) associated with the registry.voidregisterAbility(CustomAbility ability) Registers a custom ability in the registry.voidregisterManaAbility(CustomManaAbility manaAbility) Registers a custom mana ability in the registry.voidregisterSkill(CustomSkill skill) Registers a custom skill in the registry.registerSourceType(String name, XpSourceParser<?> parser) Registers a source type in the registry.voidregisterStat(CustomStat stat) Registers a custom stat in the registry.voidregisterTrait(CustomTrait trait) Registers a custom trait in the registry.voidsetContentDirectory(File file) Sets the content directory from which configuration files are loaded for this namespace.
-
Method Details
-
getNamespace
String getNamespace()Gets the namespace (plugin name) associated with the registry.- Returns:
- the namespace
-
registerSkill
Registers a custom skill in the registry.- Parameters:
skill- theCustomSkill
-
registerAbility
Registers a custom ability in the registry.- Parameters:
ability- theCustomAbility
-
registerManaAbility
Registers a custom mana ability in the registry.- Parameters:
manaAbility- theCustomManaAbility
-
registerStat
Registers a custom stat in the registry.- Parameters:
stat- theCustomStat
-
registerTrait
Registers a custom trait in the registry.- Parameters:
trait- theCustomTrait
-
registerSourceType
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
Sets the content directory from which configuration files are loaded for this namespace.- Parameters:
file- the content directory
-