Class PluginUtils

java.lang.Object
de.maxbossing.maxapi.UTils.PluginUtils

public class PluginUtils extends Object
Utilities for managing plugins.
Author:
rylinaux
  • Constructor Details

    • PluginUtils

      public PluginUtils()
  • Method Details

    • enable

      public static void enable(org.bukkit.plugin.Plugin plugin)
      Enable a plugin.
      Parameters:
      plugin - the plugin to enable
    • enableAll

      public static void enableAll()
      Enable all plugins.
    • disable

      public static void disable(org.bukkit.plugin.Plugin plugin)
      Disable a plugin.
      Parameters:
      plugin - the plugin to disable
    • disableAll

      public static void disableAll()
      Disable all plugins.
    • getFormattedName

      public static String getFormattedName(org.bukkit.plugin.Plugin plugin)
      Returns the formatted name of the plugin.
      Parameters:
      plugin - the plugin to format
      Returns:
      the formatted name
    • getFormattedName

      public static String getFormattedName(org.bukkit.plugin.Plugin plugin, boolean includeVersions)
      Returns the formatted name of the plugin.
      Parameters:
      plugin - the plugin to format
      includeVersions - whether to include the version
      Returns:
      the formatted name
    • getPluginByName

      public static org.bukkit.plugin.Plugin getPluginByName(String[] args, int start)
      Returns a plugin from an array of Strings.
      Parameters:
      args - the array
      start - the index to start at
      Returns:
      the plugin
    • getPluginByName

      public static org.bukkit.plugin.Plugin getPluginByName(String name)
      Returns a plugin from a String.
      Parameters:
      name - the name of the plugin
      Returns:
      the plugin
    • getPluginNames

      public static List<String> getPluginNames(boolean fullName)
      Returns a List of plugin names.
      Returns:
      list of plugin names
    • getPluginVersion

      public static String getPluginVersion(String name)
      Get the version of another plugin.
      Parameters:
      name - the name of the other plugin.
      Returns:
      the version.
    • getUsages

      public static String getUsages(org.bukkit.plugin.Plugin plugin)
      Returns the commands a plugin has registered.
      Parameters:
      plugin - the plugin to deal with
      Returns:
      the commands registered
    • findByCommand

      public static List<String> findByCommand(String command)
      Find which plugin has a given command registered.
      Parameters:
      command - the command.
      Returns:
      the plugin.
    • load

      public static String load(String name)
      Loads and enables a plugin.
      Parameters:
      name - plugin's name
      Returns:
      status message
    • reload

      public static void reload(org.bukkit.plugin.Plugin plugin)
      Reload a plugin.
      Parameters:
      plugin - the plugin to reload
    • reloadAll

      public static void reloadAll()
      Reload all plugins.
    • unload

      public static String unload(org.bukkit.plugin.Plugin plugin)
      Unload a plugin.
      Parameters:
      plugin - the plugin to unload
      Returns:
      the message to send to the user.
    • consolidateStrings

      public static String consolidateStrings(String[] args, int start)