geforkt von Mirrors/Paper
Adds an onLoad method to Plugin. The onLoad method is called for all plugins before the onEnable calls
Dieser Commit ist enthalten in:
Ursprung
4a2bc3299a
Commit
6ca1f24ee2
@ -59,6 +59,13 @@ public final class CraftServer implements Server {
|
|||||||
if (pluginFolder.exists()) {
|
if (pluginFolder.exists()) {
|
||||||
try {
|
try {
|
||||||
Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
|
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) {
|
for (Plugin plugin : plugins) {
|
||||||
loadPlugin(plugin);
|
loadPlugin(plugin);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren