geforkt von Mirrors/Paper
Opps! Wrong class.
By: Lymia <lymiahugs@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
9013f59815
Commit
51005cf1be
@ -18,7 +18,7 @@ public interface PluginManager {
|
||||
* @param loader Class name of the PluginLoader to register
|
||||
* @throws IllegalArgumentException Thrown when the given Class is not a valid PluginLoader
|
||||
*/
|
||||
public void RegisterInterface(Class<? extends ClassLoader> loader) throws IllegalArgumentException;
|
||||
public void RegisterInterface(Class<? extends PluginLoader> loader) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Checks if the given plugin is loaded and returns it when applicable
|
||||
|
@ -39,11 +39,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param loader Class name of the PluginLoader to register
|
||||
* @throws IllegalArgumentException Thrown when the given Class is not a valid PluginLoader
|
||||
*/
|
||||
public void RegisterInterface(Class<? extends ClassLoader> loader) throws IllegalArgumentException {
|
||||
public void RegisterInterface(Class<? extends PluginLoader> loader) throws IllegalArgumentException {
|
||||
PluginLoader instance;
|
||||
|
||||
if (PluginLoader.class.isAssignableFrom(loader)) {
|
||||
Constructor<? extends ClassLoader> constructor;
|
||||
Constructor<? extends PluginLoader> constructor;
|
||||
try {
|
||||
constructor = loader.getConstructor(Server.class);
|
||||
instance = (PluginLoader) constructor.newInstance(server);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren