fix: trial synchronising SQLManager#sendBatch (#4809)

This commit is contained in:
Jordan
2026-01-24 11:09:09 +00:00
committed by GitHub
parent 8255ac88fe
commit c1e4ac4552
2 changed files with 2 additions and 3 deletions

View File

@@ -389,7 +389,7 @@ public class SQLManager implements AbstractDB {
} }
} }
public boolean sendBatch() { public synchronized boolean sendBatch() {
try { try {
if (!getGlobalTasks().isEmpty()) { if (!getGlobalTasks().isEmpty()) {
if (this.connection.getAutoCommit()) { if (this.connection.getAutoCommit()) {

View File

@@ -391,8 +391,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
int count = 0; int count = 0;
for (PlotArea area : this.plotAreaManager.getPlotAreasSet(world)) { for (PlotArea area : this.plotAreaManager.getPlotAreasSet(world)) {
if (!Settings.Done.COUNTS_TOWARDS_LIMIT) { if (!Settings.Done.COUNTS_TOWARDS_LIMIT) {
count += count += area.getPlotsAbs(uuid).stream().filter(plot -> !DoneFlag.isDone(plot)).count();
area.getPlotsAbs(uuid).stream().filter(plot -> !DoneFlag.isDone(plot)).count();
} else { } else {
count += area.getPlotsAbs(uuid).size(); count += area.getPlotsAbs(uuid).size();
} }