diff --git a/core/src/main/java/me/mastercapexd/auth/BaseAuthPlugin.java b/core/src/main/java/me/mastercapexd/auth/BaseAuthPlugin.java index 78c01959..6c336b93 100644 --- a/core/src/main/java/me/mastercapexd/auth/BaseAuthPlugin.java +++ b/core/src/main/java/me/mastercapexd/auth/BaseAuthPlugin.java @@ -9,6 +9,7 @@ import java.util.concurrent.Executors; import java.util.stream.IntStream; +import com.alessiodp.libby.classloader.IsolatedClassLoader; import com.bivashy.auth.api.AuthPlugin; import com.bivashy.auth.api.AuthPluginProvider; import com.bivashy.auth.api.account.AccountFactory; @@ -156,7 +157,7 @@ private void initializeBasic() { this.accountFactory = new AuthAccountFactory(); this.linkTypeProvider = BaseLinkTypeProvider.allLinks(); // TODO: Replace this with IsolatedDatabaseHelperFactory - this.accountDatabase = new AuthAccountDatabaseProxy(new DatabaseHelper(this, getClass().getClassLoader())); + this.accountDatabase = new AuthAccountDatabaseProxy(new DatabaseHelper(this, new IsolatedClassLoader())); this.loginManagement = new BaseLoginManagement(this); this.registerAuthenticationSteps(); diff --git a/core/src/main/java/me/mastercapexd/auth/database/DatabaseHelper.java b/core/src/main/java/me/mastercapexd/auth/database/DatabaseHelper.java index 51b7ddc5..e692beae 100644 --- a/core/src/main/java/me/mastercapexd/auth/database/DatabaseHelper.java +++ b/core/src/main/java/me/mastercapexd/auth/database/DatabaseHelper.java @@ -9,7 +9,6 @@ import java.util.concurrent.Executors; import java.util.function.Consumer; -import com.alessiodp.libby.classloader.IsolatedClassLoader; import com.bivashy.auth.api.AuthPlugin; import com.bivashy.auth.api.config.database.DatabaseSettings; import com.bivashy.auth.api.config.database.schema.SchemaSettings; @@ -63,7 +62,7 @@ public DatabaseHelper(AuthPlugin plugin, ClassLoader classLoader) { String cacheDriverCheckSum = HashUtils.getFileCheckSum(cacheDriverFile, HashUtils.getMD5()); if (!cacheDriverFile.exists() || cacheDriverCheckSum != null && !DownloadUtil.checkSum(HashUtils.mapToMd5URL(downloadUrl), cacheDriverCheckSum)) DownloadUtil.downloadFile(downloadUrl, cacheDriverFile); - DriverUtil.loadDriver(cacheDriverFile, new IsolatedClassLoader()); + DriverUtil.loadDriver(cacheDriverFile, classLoader); DataPersisterManager.registerDataPersisters(new CryptoProviderPersister());