1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 02:34:30 +01:00

Added PluginManager.getPlugins()

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-01-11 20:58:01 +00:00
parent 91007ea0be
commit 1627c78fa1
2 changed files with 11 additions and 0 deletions
paper-api/src/main/java/org/bukkit/plugin

View file

@ -30,6 +30,13 @@ public interface PluginManager {
*/
public Plugin getPlugin(String name);
/**
* Gets a list of all currently loaded plugins
*
* @return Array of Plugins
*/
public Plugin[] getPlugins();
/**
* Checks if the given plugin is enabled or not
*

View file

@ -136,6 +136,10 @@ public final class SimplePluginManager implements PluginManager {
return lookupNames.get(name);
}
public Plugin[] getPlugins() {
return plugins.toArray(new Plugin[0]);
}
/**
* Checks if the given plugin is enabled or not
*