diff --git a/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java b/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java index f3406a60f..2e0bc9362 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/BlueprintPaster.java @@ -138,8 +138,8 @@ public class BlueprintPaster { // Tell the owner we're pasting blocks and how much time it might take owner.ifPresent(user -> tellOwner(user, blocks.size(), attached.size(), entities.size(), plugin.getSettings().getPasteSpeed())); - Bits bits = new Bits(blocks, attached, entities, - blocks.entrySet().iterator(), attached.entrySet().iterator(), entities.entrySet().iterator(), + Bits bits = new Bits(blocks, attached, entities, + blocks.entrySet().iterator(), attached.entrySet().iterator(), entities.entrySet().iterator(), plugin.getSettings().getPasteSpeed()); pastingTask = Bukkit.getScheduler().runTaskTimer(plugin, () -> pasterTask(result, owner, bits), 0L, 1L); @@ -237,7 +237,7 @@ public class BlueprintPaster { if (island == null && clipboard != null) { clipboard.setPos1(pos1); clipboard.setPos2(pos2); - } + } pasteState = PasteState.CANCEL; result.complete(true); } else if (pasteState.equals(PasteState.CANCEL)) { @@ -247,13 +247,13 @@ public class BlueprintPaster { } } - private void tellOwner(User user, int blocksSize, int attachedSize, int entitiesSize, int pasteSpeed) { + private void tellOwner(User user, int blocksSize, int attachedSize, int entitiesSize, int pasteSpeed) { // Estimated time: double total = (double) blocksSize + attachedSize + entitiesSize; BigDecimal time = BigDecimal.valueOf(total / (pasteSpeed * 20.0D) + (chunkLoadTime / 1000.0D)).setScale(1, RoundingMode.UP); user.sendMessage("commands.island.create.pasting.estimated-time", TextVariables.NUMBER, String.valueOf(time.doubleValue())); // We're pasting blocks! - user.sendMessage("commands.island.create.pasting.blocks", TextVariables.NUMBER, String.valueOf(blocksSize + attachedSize)); + user.sendMessage("commands.island.create.pasting.blocks", TextVariables.NUMBER, String.valueOf(blocksSize + attachedSize)); } /** diff --git a/src/main/java/world/bentobox/bentobox/database/objects/Island.java b/src/main/java/world/bentobox/bentobox/database/objects/Island.java index b22934d26..6e13b6d0f 100644 --- a/src/main/java/world/bentobox/bentobox/database/objects/Island.java +++ b/src/main/java/world/bentobox/bentobox/database/objects/Island.java @@ -945,7 +945,7 @@ public class Island implements DataObject, MetaDataAble { public BoundingBox getProtectionBoundingBox(Environment environment) { BoundingBox boundingBox; - + if (Environment.NORMAL.equals(environment)) { // Return normal world bounding box. @@ -982,7 +982,7 @@ public class Island implements DataObject, MetaDataAble { { boundingBox = null; } - + return boundingBox; } diff --git a/src/main/java/world/bentobox/bentobox/nms/fallback/PasteHandlerImpl.java b/src/main/java/world/bentobox/bentobox/nms/fallback/PasteHandlerImpl.java index 4ba2d8eef..fa2eae3e8 100644 --- a/src/main/java/world/bentobox/bentobox/nms/fallback/PasteHandlerImpl.java +++ b/src/main/java/world/bentobox/bentobox/nms/fallback/PasteHandlerImpl.java @@ -16,7 +16,7 @@ import java.util.stream.Collectors; public class PasteHandlerImpl implements PasteHandler { @Override public CompletableFuture pasteBlocks(Island island, World world, Map blockMap) { - return blockMap.entrySet().parallelStream() + return blockMap.entrySet().stream() .map(entry -> DefaultPasteUtil.setBlock(island, entry.getKey(), entry.getValue())) .collect( Collectors.collectingAndThen( @@ -28,7 +28,7 @@ public class PasteHandlerImpl implements PasteHandler { @Override public CompletableFuture pasteEntities(Island island, World world, Map> entityMap) { - return entityMap.entrySet().parallelStream() + return entityMap.entrySet().stream() .map(entry -> DefaultPasteUtil.setEntity(island, entry.getKey(), entry.getValue())) .collect( Collectors.collectingAndThen(