From ebf1904fff9cd68369355d3026a3c359b6cc74b7 Mon Sep 17 00:00:00 2001 From: Raphfrk Date: Sat, 12 Mar 2011 17:39:51 +0000 Subject: Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls --- src/main/java/org/bukkit/fillr/Fillr.java | 3 +++ src/main/java/org/bukkit/plugin/Plugin.java | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/bukkit/fillr/Fillr.java b/src/main/java/org/bukkit/fillr/Fillr.java index 0fd40de5..55d6ee09 100644 --- a/src/main/java/org/bukkit/fillr/Fillr.java +++ b/src/main/java/org/bukkit/fillr/Fillr.java @@ -15,6 +15,9 @@ public class Fillr extends JavaPlugin { public void onEnable() { } + public void onLoad() { + } + @Override public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { if (commandLabel.equalsIgnoreCase("check")) { diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java index 380404da..82359691 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -58,6 +58,12 @@ public interface Plugin extends CommandExecutor { */ public void onDisable(); + /** + * Called after a plugin is loaded but before it has been enabled. + * When mulitple plugins are loaded, the onLoad() for all plugins is called before any onEnable() is called. + */ + public void onLoad(); + /** * Called when this plugin is enabled */ -- cgit v1.2.3