Skip to content

Commit c1e4ac4

Browse files
authored
fix: trial synchronising SQLManager#sendBatch (#4809)
1 parent 8255ac8 commit c1e4ac4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Core/src/main/java/com/plotsquared/core/database/SQLManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public synchronized void addNotifyTask(Runnable task) {
389389
}
390390
}
391391

392-
public boolean sendBatch() {
392+
public synchronized boolean sendBatch() {
393393
try {
394394
if (!getGlobalTasks().isEmpty()) {
395395
if (this.connection.getAutoCommit()) {

Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,7 @@ public int getPlotCount(String world) {
391391
int count = 0;
392392
for (PlotArea area : this.plotAreaManager.getPlotAreasSet(world)) {
393393
if (!Settings.Done.COUNTS_TOWARDS_LIMIT) {
394-
count +=
395-
area.getPlotsAbs(uuid).stream().filter(plot -> !DoneFlag.isDone(plot)).count();
394+
count += area.getPlotsAbs(uuid).stream().filter(plot -> !DoneFlag.isDone(plot)).count();
396395
} else {
397396
count += area.getPlotsAbs(uuid).size();
398397
}

0 commit comments

Comments
 (0)