Package dev.aurelium.auraskills.api
Interface AuraSkillsApi
public interface AuraSkillsApi
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuraSkillsApi
get()
Gets the instance of theAuraSkillsApi
, throwingIllegalStateException
if the API is not loaded yet.Gets the global registry for getting any skill, stat, ability, etc.Gets theHandlers
used to register platform-specific handlers for custom content.Gets the loot manager for registering custom loot types and getting information on loaded loot tables.Gets an interface for getting common values from the main config.yml file.Gets theMessageManager
, which contains common user-configured messages, such as skill names and descriptions.@Nullable NamespacedRegistry
getNamespacedRegistry
(String namespace) Gets theNamespacedRegistry
linked to a given namespace.Gets theSourceManager
, which can be used to get sources of a type.Gets an online player's user data from the player's UUID.Gets theUserManager
, which is used to access player-related data in the plugin, including player skill and stat levels.Gets information about the XP required to level up skillsuseRegistry
(String namespace, File contentDirectory) Creates and returns theNamespacedRegistry
for the given namespace and content directory, which is used to register custom skills, stats, abilities, etc.
-
Method Details
-
getUser
Gets an online player's user data from the player's UUID. Same asUserManager.getUser(UUID)
, see for more details.- Returns:
- the
SkillsUser
object
-
getUserManager
UserManager getUserManager()Gets theUserManager
, which is used to access player-related data in the plugin, including player skill and stat levels.- Returns:
- the user manager
-
getMessageManager
MessageManager getMessageManager()Gets theMessageManager
, which contains common user-configured messages, such as skill names and descriptions.- Returns:
- the message manager
-
getXpRequirements
XpRequirements getXpRequirements()Gets information about the XP required to level up skills- Returns:
- the XP requirements
-
getGlobalRegistry
GlobalRegistry getGlobalRegistry()Gets the global registry for getting any skill, stat, ability, etc. by its id.- Returns:
- the global registry
-
useRegistry
Creates and returns theNamespacedRegistry
for the given namespace and content directory, which is used to register custom skills, stats, abilities, etc.- Parameters:
namespace
- The name of the plugin this is being called by to uniquely identify custom content. The namespace will be forced to lowercase. Referencing custom content in config files is done by appending "namespace/" to the name of the content.contentDirectory
- The directory where configuration files for custom content will be loaded from. For Bukkit, pass in JavaPlugin#getDataFolder to use the plugin's config folder.- Returns:
- the
NamespacedRegistry
to register custom content - Throws:
IllegalArgumentException
- if the namespace is "auraskills", which is not allowed
-
getNamespacedRegistry
Gets theNamespacedRegistry
linked to a given namespace. This namespace must have been already created withuseRegistry(String, File)
before calling this method.- Parameters:
namespace
- the namespace to get- Returns:
- the
NamespacedRegistry
, or null if not registered
-
getHandlers
Handlers getHandlers()Gets theHandlers
used to register platform-specific handlers for custom content.- Returns:
- the handlers
-
getMainConfig
MainConfig getMainConfig()Gets an interface for getting common values from the main config.yml file.- Returns:
- the main config provider
-
getSourceManager
SourceManager getSourceManager()Gets theSourceManager
, which can be used to get sources of a type.- Returns:
- the source manager
-
getLootManager
LootManager getLootManager()Gets the loot manager for registering custom loot types and getting information on loaded loot tables.- Returns:
- the loot manager
-
get
Gets the instance of theAuraSkillsApi
, throwingIllegalStateException
if the API is not loaded yet.- Returns:
- the API instance
- Throws:
IllegalStateException
- if the API is not loaded
-