mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Added Addon#onReload()
Related to #370. It is currently unused. Added Javadoc to #onEnable(), #onDisable(), #onLoad(), #onReload().
This commit is contained in:
parent
8a16940e14
commit
b6e8c19a86
@ -37,10 +37,31 @@ public abstract class Addon {
|
||||
state = State.DISABLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes code when enabling the addon.
|
||||
* This is called after {@link #onLoad()}.
|
||||
*/
|
||||
public abstract void onEnable();
|
||||
|
||||
/**
|
||||
* Executes code when disabling the addon.
|
||||
*/
|
||||
public abstract void onDisable();
|
||||
|
||||
/**
|
||||
* Executes code when loading the addon.
|
||||
* This is called before {@link #onEnable()}.
|
||||
* This should preferably be used to setup configuration and worlds.
|
||||
*/
|
||||
public void onLoad() {}
|
||||
|
||||
/**
|
||||
* Executes code when reloading the addon.
|
||||
*
|
||||
* @since 0.17.0 (Alpha 11)
|
||||
*/
|
||||
public void onReload() {}
|
||||
|
||||
public BentoBox getPlugin() {
|
||||
return BentoBox.getInstance();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user