From 9013f5981531bb65ff138b12b1854ad70eed6007 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot <noreply+git-bukkit@papermc.io> Date: Sun, 2 Jan 2011 00:26:04 -0600 Subject: [PATCH] Added generics to PluginManager By: Lymia <lymiahugs@gmail.com> --- paper-api/src/main/java/org/bukkit/plugin/PluginManager.java | 2 +- .../src/main/java/org/bukkit/plugin/SimplePluginManager.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/PluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/PluginManager.java index a2f88cb177..1f22efd4e0 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/PluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/PluginManager.java @@ -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 loader) throws IllegalArgumentException; + public void RegisterInterface(Class<? extends ClassLoader> loader) throws IllegalArgumentException; /** * Checks if the given plugin is loaded and returns it when applicable diff --git a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 08fed37f5f..ed17147976 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -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 loader) throws IllegalArgumentException { + public void RegisterInterface(Class<? extends ClassLoader> loader) throws IllegalArgumentException { PluginLoader instance; if (PluginLoader.class.isAssignableFrom(loader)) { - Constructor constructor; + Constructor<? extends ClassLoader> constructor; try { constructor = loader.getConstructor(Server.class); instance = (PluginLoader) constructor.newInstance(server);