Interface NamespacedRegistry
public interface NamespacedRegistry
-
Method Summary
Modifier and TypeMethodDescriptionGets the directory from which configuration files are loaded for this namespace.Gets the directory where loot tables are loaded from for this namespace.Gets the directory where menus are loaded from for this namespace.Gets the namespace (plugin name) associated with the registry.void
registerAbility
(CustomAbility ability) Registers a custom ability in the registry.void
registerManaAbility
(CustomManaAbility manaAbility) Registers a custom mana ability in the registry.void
registerSkill
(CustomSkill skill) Registers a custom skill in the registry.registerSourceType
(String name, XpSourceParser<?> parser) Registers a source type in the registry.void
registerStat
(CustomStat stat) Registers a custom stat in the registry.void
registerTrait
(CustomTrait trait) Registers a custom trait in the registry.void
setContentDirectory
(File contentDirectory) Sets the content directory from which configuration files are loaded for this namespace.void
setLootDirectory
(File lootDirectory) Sets the loot directory where loot tables are loaded for this namespace.void
setMenuDirectory
(File menuDirectory) Sets the directory where menus 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:
contentDirectory
- the content directory
-
getMenuDirectory
Gets the directory where menus are loaded from for this namespace. Menu files with the same name as the main plugin are merged together.- Returns:
- the menu directory as an optional
-
setMenuDirectory
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
-
getLootDirectory
Gets the directory where loot tables are loaded from for this namespace. Loot tables loaded from the directory are fully separate from default loot tables and must be accessed fromLootManager
and implemented.- Returns:
- the loot directory as an optional
-
setLootDirectory
Sets the loot directory where loot tables are loaded for this namespace. Loot tables are loaded fully separate from default loot tables and must be access fromLootManager
after skills have loaded to be implemented.- Parameters:
lootDirectory
- the loot directory
-