Package com.aliucord

Class PluginManager

  • All Implemented Interfaces:

    
    public class PluginManager
    
                        

    Aliucord's Plugin Manager

    • Constructor Detail

      • PluginManager

        PluginManager()
    • Method Detail

      • loadPlugin

         static void loadPlugin(Context context, File file)

        Loads a plugin

        Parameters:
        context - Context
        file - Plugin file
      • unloadPlugin

         static void unloadPlugin(String name)

        Unloads a plugin

        Parameters:
        name - Name of the plugin to unload
      • enablePlugin

         static void enablePlugin(String name)

        Enables a loaded plugin if it isn't already enabled

        Parameters:
        name - Name of the plugin to enable
      • disablePlugin

         static void disablePlugin(String name)

        Disables a loaded plugin if it isn't already disables

        Parameters:
        name - Name of the plugin to disable
      • togglePlugin

         static void togglePlugin(String name)

        Toggles a plugin. If it is enabled, it will be disabled and vice versa.

        Parameters:
        name - Name of the plugin to toggle
      • startPlugin

         static void startPlugin(String name)

        Starts a plugin

        Parameters:
        name - Name of the plugin to start
      • stopPlugin

         static void stopPlugin(String name)

        Stops a plugin

        Parameters:
        name - Name of the plugin to stop
      • remountPlugin

         static void remountPlugin(String name)

        Remounts the plugin (stop -> unload -> load -> start)

        Parameters:
        name - Name of the plugin to remount
      • getPluginPrefKey

         static String getPluginPrefKey(String name)

        Gets the preferences key for a plugin. This is used as key for plugin settings. Format: AC_PM_{PLUGIN_NAME}

        Parameters:
        name - Name of the plugin
      • isPluginEnabled

         static boolean isPluginEnabled(String name)

        Checks whether a plugin is enabled

        Parameters:
        name - Name of the plugin
      • isPluginEnabled

         static boolean isPluginEnabled(Plugin plugin)

        Checks whether a plugin is enabled

        Parameters:
        plugin - Plugin