Compare commits

..

3 Commits

Author SHA1 Message Date
JaTiTV
80255a60eb Merge pull request 'mysql-crash' (#11) from mysql-crash into main
Reviewed-on: JaTiTV/CommandGUI#11
2022-06-02 12:29:17 +02:00
f6860e9ab5 2.7.6
Critical bugfix: MySQL had a server crash
Fix: The message when disabling the GUIItem was not displayed
2022-06-01 13:32:53 +02:00
ebbec1f660 2.7.6_DEV 2022-06-01 13:23:53 +02:00
3 changed files with 4 additions and 12 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.7.5</version>
<version>2.7.6</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -150,6 +150,7 @@ public class Commands {
public static void itemOff(Player player) {
SelectDatabase.setItemStatusFalse(player);
UseItem.removeItem(player);
send.player(player, SelectMessages.ItemOFF);
}
public static void onSetSlot(Player player, Integer setSlot) {

View File

@ -54,6 +54,7 @@ public class MySQL {
send.debugmsg(Main.plugin, "§6Driver: §e" + dbmd.getDriverName());
send.debugmsg(Main.plugin, "§6Driver MajorVersion: §e" + dbmd.getDriverMajorVersion() + "." + dbmd.getDriverMinorVersion());
send.debugmsg(Main.plugin, "§6Driver Version: §e" + dbmd.getDriverVersion());
con.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
@ -73,17 +74,7 @@ public class MySQL {
Statement stmt = con.createStatement();
stmt.execute(query);
stmt.close();
}
public static void query(ArrayList<String> queryList) throws SQLException {
Connection con = ds.getConnection();
Statement stmt = con.createStatement();
for (String query : queryList) {
send.debug(Main.plugin, query);
stmt.addBatch(query);
}
stmt.executeBatch();
stmt.close();
con.close();
}