mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-02 21:54:43 +02:00
Compare commits
1 Commits
fix/v6/set
...
renovate/a
Author | SHA1 | Date | |
---|---|---|---|
b278c4eaaf |
@ -92,9 +92,9 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
|
||||
@Assisted final @NonNull Collection<BlockVector2> requestedChunks,
|
||||
@Assisted final @NonNull Runnable whenDone,
|
||||
@Assisted final @NonNull Consumer<Throwable> throwableConsumer,
|
||||
@Assisted("unloadAfter") final boolean unloadAfter,
|
||||
@Assisted final boolean unloadAfter,
|
||||
@Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers,
|
||||
@Assisted("forceSync") final boolean forceSync
|
||||
@Assisted final boolean forceSync
|
||||
) {
|
||||
this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks);
|
||||
this.availableChunks = new LinkedBlockingQueue<>();
|
||||
|
@ -235,7 +235,6 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
||||
.withConsumer(consumer)
|
||||
.unloadAfter(isUnloadAfter())
|
||||
.withProgressSubscribers(getProgressSubscribers())
|
||||
.forceSync(isForceSync())
|
||||
.build();
|
||||
return super.enqueue();
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.inject.factory;
|
||||
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.plotsquared.core.queue.ChunkCoordinator;
|
||||
import com.plotsquared.core.queue.subscriber.ProgressSubscriber;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
@ -45,9 +44,8 @@ public interface ChunkCoordinatorFactory {
|
||||
final @NonNull Collection<BlockVector2> requestedChunks,
|
||||
final @NonNull Runnable whenDone,
|
||||
final @NonNull Consumer<Throwable> throwableConsumer,
|
||||
@Assisted("unloadAfter") final boolean unloadAfter,
|
||||
final @NonNull Collection<ProgressSubscriber> progressSubscribers,
|
||||
@Assisted("forceSync") final boolean forceSync
|
||||
final boolean unloadAfter,
|
||||
final @NonNull Collection<ProgressSubscriber> progressSubscribers
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ public class ChunkCoordinatorBuilder {
|
||||
private long maxIterationTime = Settings.QUEUE.MAX_ITERATION_TIME; // A little over 1 tick;
|
||||
private int initialBatchSize = Settings.QUEUE.INITIAL_BATCH_SIZE;
|
||||
private boolean unloadAfter = true;
|
||||
private boolean forceSync = false;
|
||||
|
||||
@Inject
|
||||
public ChunkCoordinatorBuilder(@NonNull ChunkCoordinatorFactory chunkCoordinatorFactory) {
|
||||
@ -198,18 +197,6 @@ public class ChunkCoordinatorBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether the chunks coordinator should be forced to be synchronous. This is not necessarily synchronous to the server,
|
||||
* and simply effectively makes {@link ChunkCoordinator#start()} ()} a blocking operation.
|
||||
*
|
||||
* @param forceSync force sync or not
|
||||
* @since TODO
|
||||
*/
|
||||
public @NonNull ChunkCoordinatorBuilder forceSync(final boolean forceSync) {
|
||||
this.forceSync = forceSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
public @NonNull ChunkCoordinatorBuilder withProgressSubscriber(ProgressSubscriber progressSubscriber) {
|
||||
this.progressSubscribers.add(progressSubscriber);
|
||||
return this;
|
||||
@ -240,8 +227,7 @@ public class ChunkCoordinatorBuilder {
|
||||
this.whenDone,
|
||||
this.throwableConsumer,
|
||||
this.unloadAfter,
|
||||
this.progressSubscribers,
|
||||
this.forceSync
|
||||
this.progressSubscribers
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -40,12 +40,14 @@ import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public abstract class QueueCoordinator {
|
||||
@ -115,8 +117,7 @@ public abstract class QueueCoordinator {
|
||||
public abstract void setModified(long modified);
|
||||
|
||||
/**
|
||||
* Returns true if the queue should be forced to be synchronous when enqueued. This is not necessarily synchronous to the
|
||||
* server, and simply effectively makes {@link QueueCoordinator#enqueue()} a blocking operation.
|
||||
* Returns true if the queue should be forced to be synchronous when enqueued.
|
||||
*
|
||||
* @return is force sync
|
||||
*/
|
||||
@ -125,8 +126,7 @@ public abstract class QueueCoordinator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether the queue should be forced to be synchronous. This is not necessarily synchronous to the server, and simply
|
||||
* effectively makes {@link QueueCoordinator#enqueue()} a blocking operation.
|
||||
* Set whether the queue should be forced to be synchronous
|
||||
*
|
||||
* @param forceSync force sync or not
|
||||
*/
|
||||
|
@ -13,7 +13,7 @@ snakeyaml = "1.30" # Version set by Bukkit
|
||||
|
||||
# Adventure & MiniMessage
|
||||
adventure-api = "4.9.3"
|
||||
adventure-text-minimessage = "4.1.0-SNAPSHOT"
|
||||
adventure-text-minimessage = "4.11.0"
|
||||
adventure-platform-bukkit = "4.0.1"
|
||||
|
||||
# Plugins
|
||||
|
Reference in New Issue
Block a user