Packages com.phoenixplugins.sdk.api plugin addons

Interface AddonRegistry


public interface AddonRegistry
Manages the lifecycle of addons, including loading, enabling, disabling, and unloading addons.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Addon>
    T
    getAddon(Class<T> addonClazz)
    Retrieves an addon by its class type.
    getAddon(String name)
    Retrieves an addon by its name.
    Gets the plugin that this addon manager is associated with.
    boolean
    initAddon(File file)
    Loads an addon from the given file.
    boolean
    isAddonEnabled(String name)
    Checks if an addon is currently enabled.
    void
    Enables a specific addon.
    void
     
    void
    Disables a specific addon.
    void
    Unloads a specific addon, removing it from memory.
  • Method Details

    • getPlugin

      Plugin getPlugin()
      Gets the plugin that this addon manager is associated with.
      Returns:
      the JavaPlugin instance.
    • initAddon

      boolean initAddon(File file)
      Loads an addon from the given file.
      Parameters:
      file - the addon file to load.
      Returns:
      true if the addon was loaded successfully, false otherwise.
    • loadAddon

      void loadAddon(Addon addon)
      Enables a specific addon.
      Parameters:
      addon - the addon to enable.
    • unloadAddon

      void unloadAddon(Addon addon)
      Disables a specific addon.
      Parameters:
      addon - the addon to disable.
    • unregisterAddon

      void unregisterAddon(Addon addon) throws IOException
      Unloads a specific addon, removing it from memory.
      Parameters:
      addon - the addon to unload.
      Throws:
      IOException
    • getAddon

      <T extends Addon> T getAddon(Class<T> addonClazz)
      Retrieves an addon by its class type.
      Type Parameters:
      T - the addon type.
      Parameters:
      addonClazz - the class type of the addon.
      Returns:
      the addon instance if found, otherwise null.
    • getAddon

      Addon getAddon(String name)
      Retrieves an addon by its name.
      Parameters:
      name - the name of the addon.
      Returns:
      the addon instance if found, otherwise null.
    • isAddonEnabled

      boolean isAddonEnabled(String name)
      Checks if an addon is currently enabled.
      Parameters:
      name - the name of the addon.
      Returns:
      true if the addon is enabled, false otherwise.
    • setGate

      void setGate(AddonGate gate)
Last updated 10 days ago
My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping