mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-05 15:14:43 +02:00
Compare commits
2 Commits
feat/chore
...
7.5.1
Author | SHA1 | Date | |
---|---|---|---|
8741bfcf88 | |||
6a6c113e5b |
@ -44,6 +44,7 @@ import java.util.List;
|
|||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.concurrent.TimeoutException;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@ -226,16 +227,22 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
|
|||||||
loadingChunks.incrementAndGet();
|
loadingChunks.incrementAndGet();
|
||||||
PaperLib
|
PaperLib
|
||||||
.getChunkAtAsync(this.bukkitWorld, chunk.getX(), chunk.getZ(), shouldGen, true)
|
.getChunkAtAsync(this.bukkitWorld, chunk.getX(), chunk.getZ(), shouldGen, true)
|
||||||
.completeOnTimeout(null, 10L, TimeUnit.SECONDS)
|
.orTimeout(10L, TimeUnit.SECONDS)
|
||||||
.whenComplete((chunkObject, throwable) -> {
|
.whenComplete((chunkObject, throwable) -> {
|
||||||
loadingChunks.decrementAndGet();
|
loadingChunks.decrementAndGet();
|
||||||
if (throwable != null) {
|
if (throwable != null) {
|
||||||
LOGGER.error("Failed to load chunk {}", chunk, throwable);
|
if (throwable instanceof TimeoutException) {
|
||||||
// We want one less because this couldn't be processed
|
LOGGER.warn("Timed out awaiting chunk load {}", chunk);
|
||||||
this.expectedSize.decrementAndGet();
|
this.requestedChunks.offer(chunk);
|
||||||
|
} else {
|
||||||
|
LOGGER.error("Failed to load chunk {}", chunk, throwable);
|
||||||
|
// We want one less because this couldn't be processed
|
||||||
|
this.expectedSize.decrementAndGet();
|
||||||
|
}
|
||||||
} else if (chunkObject == null) {
|
} else if (chunkObject == null) {
|
||||||
LOGGER.warn("Timed out awaiting chunk load {}", chunk);
|
if (shouldGen) {
|
||||||
this.requestedChunks.offer(chunk);
|
LOGGER.error("Null chunk returned for chunk at {}", chunk);
|
||||||
|
}
|
||||||
} else if (PlotSquared.get().isMainThread(Thread.currentThread())) {
|
} else if (PlotSquared.get().isMainThread(Thread.currentThread())) {
|
||||||
this.processChunk(chunkObject);
|
this.processChunk(chunkObject);
|
||||||
} else {
|
} else {
|
||||||
|
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.5.1-SNAPSHOT"
|
version = "7.5.1"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
|
Reference in New Issue
Block a user