diff options
author | Lymia <lymiahugs@gmail.com> | 2011-01-02 00:26:04 -0600 |
---|---|---|
committer | Lymia <lymiahugs@gmail.com> | 2011-01-02 00:26:04 -0600 |
commit | e3497e12a01a9b59db12aad8464a88d279512397 (patch) | |
tree | 7bbdd3674ffd3e67943ba1121b4a35be22bab227 /src/main/java | |
parent | 9ecdf8b4baf0cfd212ed001c3cccf8a5761c08c6 (diff) | |
download | bukkit-e3497e12a01a9b59db12aad8464a88d279512397.tar bukkit-e3497e12a01a9b59db12aad8464a88d279512397.tar.gz bukkit-e3497e12a01a9b59db12aad8464a88d279512397.tar.lz bukkit-e3497e12a01a9b59db12aad8464a88d279512397.tar.xz bukkit-e3497e12a01a9b59db12aad8464a88d279512397.zip |
Added generics to PluginManager
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/plugin/PluginManager.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/plugin/SimplePluginManager.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java index a2f88cb1..1f22efd4 100644 --- a/src/main/java/org/bukkit/plugin/PluginManager.java +++ b/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/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 08fed37f..ed171479 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/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); |