Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls

This commit is contained in:
Raphfrk authored and Dinnerbone committed 2011-03-14 14:45:33 +00:00
1 parent 4a2bc3299a
commit 6ca1f24ee2
1 file changed
+7
@@ -59,6 +59,13 @@ public final class CraftServer implements Server {
if (pluginFolder.exists()) {
try {
Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
for (Plugin plugin : plugins) {
try {
plugin.onLoad();
} catch (AbstractMethodError ame) {
Logger.getLogger("Minecraft").warning("Plugin: " + plugin.getDescription().getName() + " does not support the onLoad() method");
}
}
for (Plugin plugin : plugins) {
loadPlugin(plugin);
}