Compare commits

...

6 Commits

Author SHA1 Message Date
9127e472b8 Fix IndexOutOfBoundsException on BlockFertilizeEvent 2025-02-24 16:59:23 +01:00
a0a3d8828a Back to snapshot for development 2025-02-23 20:57:47 +00:00
8741bfcf88 Release 7.5.1 2025-02-23 20:46:30 +00:00
6a6c113e5b fix: use orTimeout instead of completing null in chunk coordinator 2025-02-23 20:25:17 +00:00
3f573b4d46 Update fawe to v2.13.0 (#4607)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-23 14:35:55 +00:00
2f6db9c3db Back to snapshot for development
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2025-02-23 11:27:30 +01:00
6 changed files with 19 additions and 12 deletions

View File

@ -134,7 +134,7 @@ public class BlockEventListener117 implements Listener {
public void onBlockFertilize(BlockFertilizeEvent event) {
Block block = event.getBlock();
List<org.bukkit.block.BlockState> blocks = event.getBlocks();
Location location = BukkitUtil.adapt(blocks.get(0).getLocation());
Location location = BukkitUtil.adapt(block.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {

View File

@ -44,6 +44,7 @@ import java.util.List;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
@ -226,16 +227,22 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
loadingChunks.incrementAndGet();
PaperLib
.getChunkAtAsync(this.bukkitWorld, chunk.getX(), chunk.getZ(), shouldGen, true)
.completeOnTimeout(null, 10L, TimeUnit.SECONDS)
.orTimeout(10L, TimeUnit.SECONDS)
.whenComplete((chunkObject, throwable) -> {
loadingChunks.decrementAndGet();
if (throwable != null) {
if (throwable instanceof TimeoutException) {
LOGGER.warn("Timed out awaiting chunk load {}", chunk);
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) {
LOGGER.warn("Timed out awaiting chunk load {}", chunk);
this.requestedChunks.offer(chunk);
if (shouldGen) {
LOGGER.error("Null chunk returned for chunk at {}", chunk);
}
} else if (PlotSquared.get().isMainThread(Thread.currentThread())) {
this.processChunk(chunkObject);
} else {

View File

@ -210,7 +210,7 @@ public class ChunkCoordinatorBuilder {
* - this is just a catch-all in case of future differing server implementations; the option will work on Spigot/Paper).
*
* @param shouldGen should generate new chunks or not
* @since TODO
* @since 7.5.0
*/
public @NonNull ChunkCoordinatorBuilder shouldGen(final boolean shouldGen) {
this.shouldGen = shouldGen;

View File

@ -117,7 +117,7 @@ public abstract class QueueCoordinator {
* depending on server implementation. (i.e. setting to false may not actually disable generation as part of this operation
* - this is just a catch-all in case of future differing server implementations; the option will work on Spigot/Paper).
*
* @since TODO
* @since 7.5.0
*/
public boolean isShouldGen() {
return shouldGen;
@ -129,7 +129,7 @@ public abstract class QueueCoordinator {
* - this is just a catch-all in case of future differing server implementations; the option will work on Spigot/Paper).
*
* @param shouldGen should generate new chunks or not
* @since TODO
* @since 7.5.0
*/
public void setShouldGen(boolean shouldGen) {
this.shouldGen = shouldGen;

View File

@ -22,7 +22,7 @@ plugins {
}
group = "com.intellectualsites.plotsquared"
version = "7.5.0"
version = "7.5.2-SNAPSHOT"
if (!File("$rootDir/.git").exists()) {
logger.lifecycle("""

View File

@ -13,7 +13,7 @@ log4j = "2.19.0"
# Plugins
worldedit = "7.2.20"
fawe = "2.12.3"
fawe = "2.13.0"
placeholderapi = "2.11.6"
luckperms = "5.4"
essentialsx = "2.20.1"