`// Later on
public void cartallsql(String name) throws SQLException, IOException {
while (results.next()) {
String[] isbnParts = results.getString(6).split("_");
int voka = isbnParts.length;
for (int j = 0, Max = voka; j < Max; j++) {
if(results.getString(6).length() > 0) {
String[] enchant = isbnParts[j].split("e");
if(isbnParts[j] != isbnParts[isbnParts.length - 1]) {
enchants.add("{id:" + enchant[0] + ",lvl:"+ enchant[1] +"},");
}else{
enchants.add("{id:" + enchant[0] + ",lvl:"+ enchant[1] +"}");
}}
}
if(results.getString(6).length() > 1) {
String listString = "";
for (String s : enchants)
{
listString += s;
}
if (Integer.parseInt(results.getString(5)) > 64) {
Double countstack = Integer.parseInt(results.getString(5)) / 64.0;
countflostac = countstack.toString().split("\\.");
logger.info("Float: " + Integer.parseInt(results.getString(5)) / 64.0);
stactcounts = countflostac[0];
stackcount = Integer.parseInt(stactcounts) + 1;
for (int j = 0, Max = stackcount; j < Max; j++) {
stack = 64;
if(j == Integer.parseInt(countflostac[0])) {
stack = (64 * Integer.parseInt(countflostac[1].toString())) / 10;
}
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "give " + name + " " + itemjson(results.getString(4), 0) + " " + stack + " "+itemjson(results.getString(4), 1));
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "tellraw "+ name +" {\"text\":\"\\u0412\\u044b \\u0443\\u0441\\u043f\\u0435\\u0448\\u043d\\u043e \\u043f\\u043e\\u043b\\u0443\\u0447\\u0438\\u043b\\u0438 \\u043f\\u0440\\u0435\\u0434\\u043c\\u0435\\u0442\\u044b!\",\"bold\":true,\"color\":\"green\"}");
stack = 0;
}}else {
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "give " + name + " " + itemjson(results.getString(4), 0) + " " + results.getString(5) + " "+itemjson(results.getString(4), 1)+" {ench:["+ listString +"]}");
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "tellraw "+ name +" {\"text\":\"\\u0412\\u044b \\u0443\\u0441\\u043f\\u0435\\u0448\\u043d\\u043e \\u043f\\u043e\\u043b\\u0443\\u0447\\u0438\\u043b\\u0438 \\u043f\\u0440\\u0435\\u0434\\u043c\\u0435\\u0442\\u044b!\",\"bold\":true,\"color\":\"green\"}");
}
}else {
if (Integer.parseInt(results.getString(5)) > 64) {
Double countstack = Integer.parseInt(results.getString(5)) / 64.0;
countflostac = countstack.toString().split("\\.");
logger.info("Float: " + Integer.parseInt(results.getString(5)) / 64.0);
stactcounts = countflostac[0];
stackcount = Integer.parseInt(stactcounts) + 1;
for (int j = 0, Max = stackcount; j < Max; j++) {
stack = 64;
if(j == Integer.parseInt(countflostac[0])) {
stack = (64 * Integer.parseInt(countflostac[1].toString())) / 10;
}
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "give " + name + " " + itemjson(results.getString(4), 0) + " " + stack + " "+itemjson(results.getString(4), 1));
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "tellraw "+ name +" {\"text\":\"\\u0412\\u044b \\u0443\\u0441\\u043f\\u0435\\u0448\\u043d\\u043e \\u043f\\u043e\\u043b\\u0443\\u0447\\u0438\\u043b\\u0438 \\u043f\\u0440\\u0435\\u0434\\u043c\\u0435\\u0442\\u044b!\",\"bold\":true,\"color\":\"green\"}");
stack = 0;
}}else {
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "give " + name + " " + itemjson(results.getString(4), 0) + " " + results.getString(5) + " "+itemjson(results.getString(4), 1));
Sponge.getCommandManager().process(Sponge.getServer().getConsole(), "tellraw "+ name +" {\"text\":\"\\u0412\\u044b \\u0443\\u0441\\u043f\\u0435\\u0448\\u043d\\u043e \\u043f\\u043e\\u043b\\u0443\\u0447\\u0438\\u043b\\u0438 \\u043f\\u0440\\u0435\\u0434\\u043c\\u0435\\u0442\\u044b!\",\"bold\":true,\"color\":\"green\"}");
}
}
try (PreparedStatement delete = conn.prepareStatement("DELETE FROM `GetItem` WHERE id='" + results.getString(1) + "'");
ResultSet shopdelet = delete.executeQuery()) {
}catch (SQLException e) {
logger.info("MySQL: ERROR " + e);
}}
System.gc();
}`