mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-18 14:47:50 +01:00
Make sure plugin onLoad is really called onLoad. This fixes regression #822 from when we implemented plugin depends.
This commit is contained in:
parent
05f4e69afd
commit
aa91354666
@ -179,7 +179,7 @@ public class PluginManager
|
|||||||
return plugins.get( name );
|
return plugins.get( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadAndEnablePlugins()
|
public void loadPlugins()
|
||||||
{
|
{
|
||||||
Map<PluginDescription, Boolean> pluginStatuses = new HashMap<>();
|
Map<PluginDescription, Boolean> pluginStatuses = new HashMap<>();
|
||||||
for ( Map.Entry<String, PluginDescription> entry : toLoad.entrySet() )
|
for ( Map.Entry<String, PluginDescription> entry : toLoad.entrySet() )
|
||||||
@ -192,7 +192,10 @@ public class PluginManager
|
|||||||
}
|
}
|
||||||
toLoad.clear();
|
toLoad.clear();
|
||||||
toLoad = null;
|
toLoad = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void enablePlugins()
|
||||||
|
{
|
||||||
for ( Plugin plugin : plugins.values() )
|
for ( Plugin plugin : plugins.values() )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -194,11 +194,13 @@ public class BungeeCord extends ProxyServer
|
|||||||
|
|
||||||
pluginsFolder.mkdir();
|
pluginsFolder.mkdir();
|
||||||
pluginManager.detectPlugins( pluginsFolder );
|
pluginManager.detectPlugins( pluginsFolder );
|
||||||
|
|
||||||
|
pluginManager.loadPlugins();
|
||||||
config.load();
|
config.load();
|
||||||
|
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
|
|
||||||
pluginManager.loadAndEnablePlugins();
|
pluginManager.enablePlugins();
|
||||||
|
|
||||||
connectionThrottle = new ConnectionThrottle( config.getThrottle() );
|
connectionThrottle = new ConnectionThrottle( config.getThrottle() );
|
||||||
startListeners();
|
startListeners();
|
||||||
|
Loading…
Reference in New Issue
Block a user