Fix some errors related to disabling modules - #890
This commit is contained in:
parent
5beafed279
commit
575a6b6ea0
@ -32,6 +32,8 @@ public class ModuleManager
|
||||
|
||||
public void load(ProxyServer proxy, File moduleDirectory) throws Exception
|
||||
{
|
||||
moduleDirectory.mkdir();
|
||||
|
||||
ModuleVersion bungeeVersion = ModuleVersion.parse( proxy.getVersion() );
|
||||
if ( bungeeVersion == null )
|
||||
{
|
||||
@ -39,8 +41,6 @@ public class ModuleManager
|
||||
return;
|
||||
}
|
||||
|
||||
moduleDirectory.mkdir();
|
||||
|
||||
List<ModuleSpec> modules = new ArrayList<>();
|
||||
File configFile = new File( "modules.yml" );
|
||||
// Start Yaml
|
||||
@ -66,9 +66,10 @@ public class ModuleManager
|
||||
// End yaml
|
||||
|
||||
List<String> defaults = new ArrayList<>();
|
||||
if ( config.containsKey( "modules" ) )
|
||||
Object readModules = config.get( "modules" );
|
||||
if ( readModules != null )
|
||||
{
|
||||
defaults.addAll( (Collection) config.get( "modules" ) );
|
||||
defaults.addAll( (Collection) readModules );
|
||||
}
|
||||
int version = ( config.containsKey( "version" ) ) ? (int) config.get( "version" ) : 0;
|
||||
switch ( version )
|
||||
|
Loading…
Reference in New Issue
Block a user