forked from LogBlock/LogBlock
Fix issues with minecraft 1.18
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user