Fix issues with minecraft 1.18

This commit is contained in:
Brokkonaut
2021-12-01 07:48:03 +01:00
parent 964e60b2e5
commit 749d114acd
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ public class LogBlock extends JavaPlugin {
if (rs.next()) { if (rs.next()) {
Config.mb4 = true; Config.mb4 = true;
// Allegedly JDBC driver since 2010 hasn't needed this. I did. // Allegedly JDBC driver since 2010 hasn't needed this. I did.
st.executeQuery("SET NAMES utf8mb4;"); st.executeUpdate("SET NAMES utf8mb4;");
} }
conn.close(); conn.close();
Updater updater = new Updater(this); Updater updater = new Updater(this);

View File

@@ -43,7 +43,7 @@ public class MySQLConnectionPool implements Closeable {
public Connection getConnection() throws SQLException { public Connection getConnection() throws SQLException {
Connection connection = ds.getConnection(); Connection connection = ds.getConnection();
if (Config.mb4) { if (Config.mb4) {
connection.createStatement().executeQuery("SET NAMES utf8mb4"); connection.createStatement().executeUpdate("SET NAMES utf8mb4");
} }
return connection; return connection;
} }