Skip to content

Commit

Permalink
Spigot does not support parallel stream processing for placing blocks…
Browse files Browse the repository at this point in the history
… and entities in the world.

This is a hot-fix release.
  • Loading branch information
BONNe committed Oct 11, 2022
1 parent 1a59ca7 commit 065f4ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.21.0</build.version>
<build.version>1.21.1</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class PasteHandlerImpl implements PasteHandler {
@Override
public CompletableFuture<Void> pasteBlocks(Island island, World world, Map<Location, BlueprintBlock> blockMap) {
return blockMap.entrySet().parallelStream()
return blockMap.entrySet().stream()
.map(entry -> DefaultPasteUtil.setBlock(island, entry.getKey(), entry.getValue()))
.collect(
Collectors.collectingAndThen(
Expand All @@ -28,7 +28,7 @@ public CompletableFuture<Void> pasteBlocks(Island island, World world, Map<Locat

@Override
public CompletableFuture<Void> pasteEntities(Island island, World world, Map<Location, List<BlueprintEntity>> entityMap) {
return entityMap.entrySet().parallelStream()
return entityMap.entrySet().stream()
.map(entry -> DefaultPasteUtil.setEntity(island, entry.getKey(), entry.getValue()))
.collect(
Collectors.collectingAndThen(
Expand Down

0 comments on commit 065f4ba

Please sign in to comment.