Interface AuraSkillsApi


public interface AuraSkillsApi
  • Method Details

    • getUser

      SkillsUser getUser(UUID playerId)
      Gets an online player's user data from the player's UUID. Same as UserManager.getUser(UUID), see for more details.
      Returns:
      the SkillsUser object
    • getUserManager

      UserManager getUserManager()
      Gets the UserManager, 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 the MessageManager, 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

      NamespacedRegistry useRegistry(String namespace, File contentDirectory)
      Creates and returns the NamespacedRegistry 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

      @Nullable @Nullable NamespacedRegistry getNamespacedRegistry(String namespace)
      Gets the NamespacedRegistry linked to a given namespace. This namespace must have been already created with useRegistry(String, File) before calling this method.
      Parameters:
      namespace - the namespace to get
      Returns:
      the NamespacedRegistry, or null if not registered
    • getHandlers

      Handlers getHandlers()
      Gets the Handlers 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 the SourceManager, 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

      static AuraSkillsApi get()
      Gets the instance of the AuraSkillsApi, throwing IllegalStateException if the API is not loaded yet.
      Returns:
      the API instance
      Throws:
      IllegalStateException - if the API is not loaded