Ensure modules are enabled even when we can't detect version
This commit is contained in:
parent
f1b329bf21
commit
6602c22147
@ -189,7 +189,9 @@ public class BungeeCord extends ProxyServer
|
|||||||
{
|
{
|
||||||
ResourceLeakDetector.setEnabled( false ); // Eats performance
|
ResourceLeakDetector.setEnabled( false ); // Eats performance
|
||||||
|
|
||||||
moduleManager.load( this );
|
File moduleDirectory = new File( "modules" );
|
||||||
|
moduleManager.load( this, moduleDirectory );
|
||||||
|
pluginManager.detectPlugins( moduleDirectory );
|
||||||
|
|
||||||
pluginsFolder.mkdir();
|
pluginsFolder.mkdir();
|
||||||
pluginManager.detectPlugins( pluginsFolder );
|
pluginManager.detectPlugins( pluginsFolder );
|
||||||
|
@ -30,7 +30,7 @@ public class ModuleManager
|
|||||||
knownSources.put( "jenkins", new JenkinsModuleSource() );
|
knownSources.put( "jenkins", new JenkinsModuleSource() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load(ProxyServer proxy) throws Exception
|
public void load(ProxyServer proxy, File moduleDirectory) throws Exception
|
||||||
{
|
{
|
||||||
ModuleVersion bungeeVersion = ModuleVersion.parse( proxy.getVersion() );
|
ModuleVersion bungeeVersion = ModuleVersion.parse( proxy.getVersion() );
|
||||||
if ( bungeeVersion == null )
|
if ( bungeeVersion == null )
|
||||||
@ -39,7 +39,6 @@ public class ModuleManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
File moduleDirectory = new File( "modules" );
|
|
||||||
moduleDirectory.mkdir();
|
moduleDirectory.mkdir();
|
||||||
|
|
||||||
List<ModuleSpec> modules = new ArrayList<>();
|
List<ModuleSpec> modules = new ArrayList<>();
|
||||||
@ -121,8 +120,6 @@ public class ModuleManager
|
|||||||
module.getProvider().retrieve( module, bungeeVersion );
|
module.getProvider().retrieve( module, bungeeVersion );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy.getPluginManager().detectPlugins( moduleDirectory );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ModuleVersion getVersion(File file)
|
private ModuleVersion getVersion(File file)
|
||||||
|
Loading…
Reference in New Issue
Block a user