mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls
By: Raphfrk <raphfrk@gmail.com>
This commit is contained in:
parent
dfc8620a1b
commit
e377a96a02
2 changed files with 9 additions and 0 deletions
|
@ -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")) {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue