mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 22:15:28 +00:00
Don't load database if it's not in use
This commit is contained in:
1 parent
9486e18c4f
commit
6d40fbca9a
1 file changed
+2
@@ -65,6 +65,7 @@ public class Enterprise extends ConfigurationFile {
|
|||||||
ConfigValue<String> databaseSchema = new ConfigValue<String>("database.database");
|
ConfigValue<String> databaseSchema = new ConfigValue<String>("database.database");
|
||||||
ConfigValue<Integer> databasePort = new ConfigValue<Integer>("database.port");
|
ConfigValue<Integer> databasePort = new ConfigValue<Integer>("database.port");
|
||||||
|
|
||||||
|
if (getConfiguration().getConfig().enterprise.getValue()) {
|
||||||
// Convert database values to Database
|
// Convert database values to Database
|
||||||
database = new Database(
|
database = new Database(
|
||||||
Database.DatabaseType.valueOf(databaseType.getValue()),
|
Database.DatabaseType.valueOf(databaseType.getValue()),
|
||||||
@@ -81,4 +82,5 @@ public class Enterprise extends ConfigurationFile {
|
|||||||
|
|
||||||
database.connect();
|
database.connect();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user