From 991703914c4c7e5cbdb0b897dd645bdd2378ecad Mon Sep 17 00:00:00 2001 From: "Patrick \"IPat\" Hein" Date: Wed, 7 Jul 2021 10:10:51 +0200 Subject: [PATCH] Batching task count reset (#3144) * Negate mob-place flag debug message * fixed a little typo :) * Added check for dragon egg teleportation event https://github.com/IntellectualSites/PlotSquared/issues/3074 * Basic dragon egg interact bugfix (Left-click interaction) * Lifted admin if-condition out of roads (out-of-plot) only block (for animals) * See https://github.com/IntellectualSites/PlotSquared-Legacy/commit/4514d39bbd814c7f18521f6502dc7eabbfe78435 Co-authored-by: NotMyFault --- .../main/java/com/plotsquared/core/database/SQLManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/database/SQLManager.java b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java index dcf427055..03545cfc9 100644 --- a/Core/src/main/java/com/plotsquared/core/database/SQLManager.java +++ b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java @@ -394,7 +394,7 @@ public class SQLManager implements AbstractDB { } int count = -1; if (!this.plotTasks.isEmpty()) { - count = 0; + count = Math.max(count, 0); if (this.connection.getAutoCommit()) { this.connection.setAutoCommit(false); } @@ -450,7 +450,7 @@ public class SQLManager implements AbstractDB { } } if (!this.playerTasks.isEmpty()) { - count = 0; + count = Math.max(count, 0); if (this.connection.getAutoCommit()) { this.connection.setAutoCommit(false); } @@ -495,7 +495,7 @@ public class SQLManager implements AbstractDB { } } if (!this.clusterTasks.isEmpty()) { - count = 0; + count = Math.max(count, 0); if (this.connection.getAutoCommit()) { this.connection.setAutoCommit(false); }