Added support for soft dependencies.

Soft dependencies allow plugins to request to be loaded after another plugin, but they will not throw an UnknownDependency exception if the other plugin is not present.

By: Raphfrk <raphfrk@gmail.com>
This commit is contained in:
Bukkit/Spigot
2011-04-27 20:35:08 +01:00
parent 788c41c330
commit 5ef26c647b
5 changed files with 114 additions and 2 deletions

View File

@@ -22,6 +22,17 @@ public interface PluginLoader {
*/
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException;
/**
* Loads the plugin contained in the specified file
*
* @param file File to attempt to load
* @param ignoreSoftDependencies Loader will ignore soft dependencies if this flag is set to true
* @return Plugin that was contained in the specified file, or null if
* unsuccessful
* @throws InvalidPluginException Thrown when the specified file is not a plugin
*/
public Plugin loadPlugin(File file, boolean ignoreSoftDependencies) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException;
/**
* Returns a list of all filename filters expected by this PluginLoader
*/