use of me.staartvin.statz.hooks.handlers.PluginLibraryHandler in project Statz by Staartvin.
the class DependencyManager method isAvailable.
/**
* Check whether a plugin is available using PluginLibrary.
* @param library Library to check
* @return true if it is available, false otherwise.
*/
public boolean isAvailable(Library library) {
if (!this.isAvailable(StatzDependency.PLUGINLIBRARY))
return false;
if (library == null)
return false;
PluginLibraryHandler handler = (PluginLibraryHandler) getDependency(StatzDependency.PLUGINLIBRARY);
if (handler == null) {
return false;
}
LibraryHook hook = handler.getLibraryHook(library);
if (hook == null) {
return false;
}
return hook.isAvailable();
}
Aggregations