org.bukkit.plugin.UnknownDependencyException Java Examples

The following examples show how to use org.bukkit.plugin.UnknownDependencyException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RuntimePluginLoader.java    From PGM with GNU Affero General Public License v3.0 7 votes vote down vote up
@SuppressWarnings("unchecked")
public Plugin loadPlugin(PluginDescriptionFile plugin) throws UnknownDependencyException {
  final SimplePluginManager manager = (SimplePluginManager) server.getPluginManager();
  try {
    final File file = new File("plugins", plugin.getName());
    final Class[] init =
        new Class[] {
          PluginLoader.class, Server.class, PluginDescriptionFile.class, File.class, File.class
        };
    final JavaPlugin instance =
        (JavaPlugin)
            Class.forName(plugin.getMain())
                .getConstructor(init)
                .newInstance(this, server, plugin, file, file);

    readField(SimplePluginManager.class, manager, List.class, "plugins").add(instance);
    readField(SimplePluginManager.class, manager, Map.class, "lookupNames")
        .put(instance.getName().toLowerCase(), instance);

    return instance;
  } catch (Throwable t) {
    throw new UnknownDependencyException(
        t, "Unable to load plugin: " + plugin.getName() + " (" + plugin.getMain() + ")");
  }
}
 
Example #2
Source File: RuntimePluginLoader.java    From PGM with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public Plugin loadPlugin(File file) throws UnknownDependencyException, InvalidPluginException {
  return loader.loadPlugin(file);
}
 
Example #3
Source File: LoggedPluginManager.java    From VoxelGamesLibv2 with MIT License 4 votes vote down vote up
@Override
public Plugin loadPlugin(File file)
        throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
    return delegate.loadPlugin(file);
}
 
Example #4
Source File: LoggedPluginManager.java    From NovaGuilds with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
	return delegate.loadPlugin(file);
}