diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index d8e0ba569e..ac1d188b44 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/paper-api/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 authors = desc.getAuthors(); - if (authors.size() > 0) { - server.getLogger().info("Hint! It's probably someone called '" + authors.get(0) + "'"); - } - } - public JavaPlugin() { } diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 7c9402ac17..b400d7a038 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/paper-api/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 plugin = jarClass.asSubclass(JavaPlugin.class); - try { - Constructor 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 constructor = plugin.getConstructor(); - result = constructor.newInstance(); - } - + Constructor constructor = plugin.getConstructor(); + result = constructor.newInstance(); + result.initialize(this, server, description, dataFolder, file, loader); } catch (Throwable ex) { throw new InvalidPluginException(ex);