From 5526d4a226ee99e382d754521058ece04a14700b Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 13 Jun 2015 17:55:40 +1000 Subject: [PATCH] 2 Fixes (PlotMe conversion, pve) - Fixed PlotMe conversion -> MySQL for < 5K plots. - Fixed admin PVE bypass on unowned plots --- PlotSquared/pom.xml | 2 +- .../intellectualcrafters/plot/database/SQLManager.java | 8 ++++---- .../intellectualcrafters/plot/listeners/PlayerEvents.java | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml index 6e8b15d2e..92d354385 100644 --- a/PlotSquared/pom.xml +++ b/PlotSquared/pom.xml @@ -8,7 +8,7 @@ UTF-8 PlotSquared - 2.11.20 + 2.11.21 PlotSquared jar diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index eb37e83b4..961566bd5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -343,7 +343,7 @@ public class SQLManager implements AbstractDB { for (int j = 0; j <= amount; j++) { final List subList = objList.subList(j * packet, Math.min(size, (j + 1) * packet)); if (subList.size() == 0) { - return; + break; } if (last == -1) { last = subList.size(); @@ -364,7 +364,7 @@ public class SQLManager implements AbstractDB { last = subList.size(); preparedStmt.addBatch(); } - PlotSquared.log("&aSuccess 1: " + count + " | " + objList.get(0).getClass().getCanonicalName()); + PlotSquared.log("&aBatch 1: " + count + " | " + objList.get(0).getClass().getCanonicalName()); preparedStmt.executeBatch(); preparedStmt.clearParameters(); preparedStmt.close(); @@ -406,7 +406,7 @@ public class SQLManager implements AbstractDB { last = subList.size(); preparedStmt.addBatch(); } - PlotSquared.log("&aSuccess 2: " + count + " | " + objList.get(0).getClass().getCanonicalName()); + PlotSquared.log("&aBatch 2: " + count + " | " + objList.get(0).getClass().getCanonicalName()); preparedStmt.executeBatch(); preparedStmt.clearParameters(); preparedStmt.close(); @@ -430,7 +430,7 @@ public class SQLManager implements AbstractDB { PlotSquared.log("&c[ERROR] " + "Failed to save " + obj + "!"); } } - PlotSquared.log("&aSuccess 3"); + PlotSquared.log("&aBatch 3"); preparedStmt.executeBatch(); preparedStmt.close(); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index a55d45ced..ac3423d67 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -1465,6 +1465,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi e.setCancelled(true); return; } + return; } else if (aPlr && FlagManager.isPlotFlagTrue(plot, "pvp")) { return; }