Fixing multiple bugs

- Fixes /antivpn alerts error caused by VpnStrings not being initialized. All of that initialized is now done globally inside AntiVPN class instead of individually per platform.
- Fixed bug where MySQL will only load H2.
- H2 is now a separate object and will not create an sql error on startup from the index creation process.
This commit is contained in:
funkemunky
2022-04-11 12:58:43 -04:00
parent 60043dd07a
commit 4424b2b9a5
6 changed files with 293 additions and 13 deletions
@@ -242,9 +242,7 @@ public class MySqlVPN implements VPNDatabase {
if (!AntiVPN.getInstance().getVpnConfig().isDatabaseEnabled())
return;
AntiVPN.getInstance().getExecutor().log("Initializing MySQL...");
if(AntiVPN.getInstance().getVpnConfig().getDatabaseType().contains("sql")) {
MySQL.init();
} else MySQL.initH2();
MySQL.init();
AntiVPN.getInstance().getExecutor().log("Creating tables...");