summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphfrk <raphfrk@gmail.com>2011-03-12 17:38:10 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-03-14 14:45:33 +0000
commit6ca1f24ee2bb91405cfe874e7cdbe3007401092b (patch)
tree11aa406550935dd30c62acb86577feebebd935b2
parent4a2bc3299ae1e07e3cea92160824f205f6242677 (diff)
downloadcraftbukkit-6ca1f24ee2bb91405cfe874e7cdbe3007401092b.tar
craftbukkit-6ca1f24ee2bb91405cfe874e7cdbe3007401092b.tar.gz
craftbukkit-6ca1f24ee2bb91405cfe874e7cdbe3007401092b.tar.lz
craftbukkit-6ca1f24ee2bb91405cfe874e7cdbe3007401092b.tar.xz
craftbukkit-6ca1f24ee2bb91405cfe874e7cdbe3007401092b.zip
Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c8478195..2db3f4b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -60,6 +60,13 @@ public final class CraftServer implements Server {
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);
}
} catch (Throwable ex) {