diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-25 22:00:58 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-25 22:01:21 +0000 |
commit | 1dac795bf122aee5ad3586afc0af8e08f2d01f3c (patch) | |
tree | de03b0065004d310554dafead55a23e0ae1b2a4d | |
parent | a647006042bf9faa9e5ac369e21e0d4e53a54653 (diff) | |
download | bukkit-1dac795bf122aee5ad3586afc0af8e08f2d01f3c.tar bukkit-1dac795bf122aee5ad3586afc0af8e08f2d01f3c.tar.gz bukkit-1dac795bf122aee5ad3586afc0af8e08f2d01f3c.tar.lz bukkit-1dac795bf122aee5ad3586afc0af8e08f2d01f3c.tar.xz bukkit-1dac795bf122aee5ad3586afc0af8e08f2d01f3c.zip |
No longer supporting the TSLPC (inb4pitchforks)
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPlugin.java | 23 | ||||
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 11 |
2 files changed, 3 insertions, 31 deletions
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index d8e0ba56..ac1d188b 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -25,29 +25,6 @@ public abstract class JavaPlugin implements Plugin { private ClassLoader classLoader = null; private Configuration config = null; - /** - * Constructs a new Java plugin instance - * - * @param pluginLoader PluginLoader that is responsible for this plugin - * @param instance Server instance that is running this plugin - * @param desc PluginDescriptionFile containing metadata on this plugin - * @param folder Folder containing the plugin's data - * @param plugin File containing this plugin - * @param cLoader ClassLoader which holds this plugin - */ - public JavaPlugin(PluginLoader pluginLoader, Server instance, - PluginDescriptionFile desc, File folder, File plugin, - ClassLoader cLoader) { - initialize(pluginLoader, instance, desc, folder, plugin, cLoader); - - server.getLogger().warning("Using the stupidly long constructor " + desc.getMain() + "(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of " + desc.getName() + " to remove it! (Nothing is broken, we just like to keep code clean.)"); - - ArrayList<String> authors = desc.getAuthors(); - if (authors.size() > 0) { - server.getLogger().info("Hint! It's probably someone called '" + authors.get(0) + "'"); - } - } - public JavaPlugin() { } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 7c9402ac..b400d7a0 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -72,14 +72,9 @@ public final class JavaPluginLoader implements PluginLoader { Class<?> jarClass = Class.forName(description.getMain(), true, loader); Class<? extends JavaPlugin> plugin = jarClass.asSubclass(JavaPlugin.class); - try { - Constructor<? extends JavaPlugin> constructor = plugin.getConstructor(PluginLoader.class, Server.class, PluginDescriptionFile.class, File.class, File.class, ClassLoader.class); - result = constructor.newInstance(this, server, description, dataFolder, file, loader); - } catch (NoSuchMethodException ex) { - Constructor<? extends JavaPlugin> constructor = plugin.getConstructor(); - result = constructor.newInstance(); - } - + Constructor<? extends JavaPlugin> constructor = plugin.getConstructor(); + result = constructor.newInstance(); + result.initialize(this, server, description, dataFolder, file, loader); } catch (Throwable ex) { throw new InvalidPluginException(ex); |