mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls
This commit is contained in:
@@ -59,6 +59,13 @@ public final class CraftServer implements Server {
|
||||
if (pluginFolder.exists()) {
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user