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

This commit is contained in:
Raphfrk 2011-03-12 17:39:51 +00:00 committed by Dinnerbone
parent 2a87759443
commit ebf1904fff
2 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,9 @@ public class Fillr extends JavaPlugin {
public void onEnable() { public void onEnable() {
} }
public void onLoad() {
}
@Override @Override
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
if (commandLabel.equalsIgnoreCase("check")) { if (commandLabel.equalsIgnoreCase("check")) {

View File

@ -58,6 +58,12 @@ public interface Plugin extends CommandExecutor {
*/ */
public void onDisable(); 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 * Called when this plugin is enabled
*/ */