diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index eb964e43a..474621804 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -146,6 +146,7 @@ public class Purge extends SubCommand { Runnable run = new Runnable() { @Override public void run() { + PS.debug("Calculating plots to purge, please wait..."); HashSet ids = new HashSet<>(); for (Plot plot : toDelete) { if (plot.temp != Integer.MAX_VALUE) { diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index df68122fb..b066deea6 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -209,6 +209,7 @@ public class Trim extends SubCommand { @Override public void run() { Trim.TASK = false; + player.sendMessage("Trim done!"); } }; } diff --git a/Core/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/Core/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index 0acfa762c..8cf36a1ec 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -2040,9 +2040,8 @@ public class SQLManager implements AbstractDB { try { ArrayList uniqueIdsList = new ArrayList(uniqueIds); String stmt_prefix = ""; - StringBuilder idstr2 = new StringBuilder(""); int size = uniqueIdsList.size(); - int packet = 5000; + int packet = 990; int amount = size / packet; int count = 0; int last = -1; @@ -2052,6 +2051,8 @@ public class SQLManager implements AbstractDB { if (subList.isEmpty()) { break; } + StringBuilder idstr2 = new StringBuilder(""); + stmt_prefix = ""; for (Integer id : subList) { idstr2.append(stmt_prefix).append(id); stmt_prefix = " OR `id` = "; @@ -2082,6 +2083,7 @@ public class SQLManager implements AbstractDB { .prepareStatement("DELETE FROM `" + SQLManager.this.prefix + "plot` WHERE `id` = " + idstr2); stmt.executeUpdate(); stmt.close(); + commit(); } } catch (SQLException e) { e.printStackTrace();