diff --git a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/MySQLDB.java b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/MySQLDB.java index 96e48aa47..936da1bad 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/MySQLDB.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/MySQLDB.java @@ -153,7 +153,9 @@ public class MySQLDB extends SQLDB { Enumeration drivers = DriverManager.getDrivers(); while (drivers.hasMoreElements()) { Driver driver = drivers.nextElement(); - if ("com.mysql.cj.jdbc.Driver".equals(driver.getClass().getName())) { + Class driverClass = driver.getClass(); + // Checks that it's from our class loader to avoid unloading another plugin's/the server's driver + if ("com.mysql.cj.jdbc.Driver".equals(driverClass.getName()) && driverClass.getClassLoader() == driverClassLoader) { try { DriverManager.deregisterDriver(driver); } catch (SQLException e) {