From bd9476a1750c9b9deea0ab8101ba94143d895b33 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 18 Oct 2021 23:09:21 +0200 Subject: [PATCH] refactor: Address `.editorconfig` violations --- .../adapter/ext/fawe/PaperweightAdapter.java | 76 +- .../ext/fawe/PaperweightDataConverters.java | 210 ++- .../ext/fawe/PaperweightFakePlayer.java | 7 +- .../fawe/PaperweightWorldNativeAccess.java | 48 +- .../v1_17_R1_2/PaperweightFaweAdapter.java | 11 +- .../fawe/v1_17_R1_2/PaperweightGetBlocks.java | 6 +- .../v1_17_R1_2/regen/PaperweightRegen.java | 3 - .../bukkit/listener/ChunkListener.java | 2 +- .../plotsquared/PlotSquaredFeature.java | 1 - .../bukkit/util/UpdateNotification.java | 2 +- .../worldedit/bukkit/adapter/Refraction.java | 2 + .../fastasyncworldedit/util/StubServer.java | 3 +- .../fastasyncworldedit/core/FaweVersion.java | 2 - .../command/tool/brush/CatenaryBrush.java | 1 - .../core/configuration/Config.java | 2 +- .../core/configuration/Settings.java | 1 + .../core/extent/DisallowedBlocksExtent.java | 2 +- .../core/extent/MemoryCheckingExtent.java | 1 - .../extent/clipboard/SimpleClipboard.java | 1 + .../changeset/AbstractDelegateChangeSet.java | 1 - .../core/util/UnsafeUtility.java | 1 - .../java/com/sk89q/worldedit/EditSession.java | 2 +- .../worldedit/command/BrushCommands.java | 2 +- .../worldedit/command/ChunkCommands.java | 1 - .../worldedit/command/SchematicCommands.java | 1 - .../factory/parser/DefaultBlockParser.java | 11 +- .../scripting/CraftScriptContext.java | 4 +- .../worldedit/world/block/BlockState.java | 5 +- .../world/block/BlockStateHolder.java | 4 +- .../sk89q/worldedit/world/chunk/Chunk.java | 5 +- .../world/registry/LegacyMapper.java | 6 +- .../world/snapshot/SnapshotRestore.java | 2 - .../worldedit/world/storage/ChunkStore.java | 1 + .../src/main/resources/lang/strings.json | 1298 ++++++++--------- .../util/commands/CommandContextTest.java | 3 +- .../command/CommandArgParserTest.java | 17 +- .../expression/BaseExpressionTest.java | 1 + .../internal/expression/ExpressionTest.java | 280 ++-- .../expression/ExpressionTestCase.java | 1 + .../expression/RealExpressionTest.java | 128 +- .../internal/util/DeprecationUtilTest.java | 11 +- .../util/RegionOptimizedVectorSorterTest.java | 18 +- .../sk89q/worldedit/util/LocationTest.java | 2 +- .../util/collection/PositionListTest.java | 5 + .../worldedit/util/eventbus/EventBusTest.java | 1 + .../worldedit/util/io/file/MorePathsTest.java | 17 +- .../worldedit/util/test/ResourceLockKeys.java | 2 + .../util/test/VariedVectorGenerator.java | 4 +- .../worldedit/util/test/VariedVectorPair.java | 2 + .../snapshot/experimental/fs/EntryMaker.java | 15 +- .../snapshot/experimental/fs/FSSDContext.java | 11 +- .../experimental/fs/FSSDTestType.java | 231 +-- .../fs/FileSystemSnapshotDatabaseTest.java | 68 +- 53 files changed, 1415 insertions(+), 1127 deletions(-) diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java index 6b1f0635a..e725e8dd8 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java @@ -141,6 +141,7 @@ import org.bukkit.generator.ChunkGenerator; import org.spigotmc.SpigotConfig; import org.spigotmc.WatchdogThread; +import javax.annotation.Nullable; import java.lang.ref.WeakReference; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -162,7 +163,6 @@ import java.util.concurrent.ForkJoinPool; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; @@ -193,7 +193,8 @@ public final class PaperweightAdapter implements BukkitImplAdapter { serverWorldsField.setAccessible(true); getChunkFutureMethod = ServerChunkCache.class.getDeclaredMethod("getChunkFutureMainThread", - int.class, int.class, ChunkStatus.class, boolean.class); + int.class, int.class, ChunkStatus.class, boolean.class + ); getChunkFutureMethod.setAccessible(true); chunkProviderExecutorField = ServerChunkCache.class.getDeclaredField( @@ -232,7 +233,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { * Read the given NBT data into the given tile entity. * * @param tileEntity the tile entity - * @param tag the tag + * @param tag the tag */ static void readTagIntoTileEntity(net.minecraft.nbt.CompoundTag tag, BlockEntity tileEntity) { tileEntity.load(tag); @@ -243,7 +244,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { * Write the tile entity's NBT data to the given tag. * * @param tileEntity the tile entity - * @param tag the tag + * @param tag the tag */ private static void readTileEntityIntoTag(BlockEntity tileEntity, net.minecraft.nbt.CompoundTag tag) { tileEntity.save(tag); @@ -262,7 +263,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { /** * Create an entity using the given entity ID. * - * @param id the entity ID + * @param id the entity ID * @param world the world * @return an entity or null */ @@ -275,7 +276,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { * Write the given NBT data into the given entity. * * @param entity the entity - * @param tag the tag + * @param tag the tag */ private static void readTagIntoEntity(net.minecraft.nbt.CompoundTag tag, Entity entity) { entity.load(tag); @@ -285,7 +286,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { * Write the entity's NBT data to the given tag. * * @param entity the entity - * @param tag the tag + * @param tag the tag */ private static void readEntityIntoTag(Entity entity, net.minecraft.nbt.CompoundTag tag) { entity.save(tag); @@ -349,8 +350,10 @@ public final class PaperweightAdapter implements BukkitImplAdapter { @Override public WorldNativeAccess createWorldNativeAccess(org.bukkit.World world) { - return new PaperweightWorldNativeAccess(this, - new WeakReference<>(((CraftWorld) world).getHandle())); + return new PaperweightWorldNativeAccess( + this, + new WeakReference<>(((CraftWorld) world).getHandle()) + ); } private static net.minecraft.core.Direction adapt(Direction face) { @@ -462,7 +465,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { return TranslatableComponent.of(CraftItemStack.asNMSCopy(BukkitAdapter.adapt(itemStack)).getDescriptionId()); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) @Override public Map> getProperties(BlockType blockType) { Map> properties = Maps.newTreeMap(String::compareTo); @@ -474,11 +477,25 @@ public final class PaperweightAdapter implements BukkitImplAdapter { if (state instanceof net.minecraft.world.level.block.state.properties.BooleanProperty) { property = new BooleanProperty(state.getName(), ImmutableList.copyOf(state.getPossibleValues())); } else if (state instanceof DirectionProperty) { - property = new DirectionalProperty(state.getName(), - (List) state.getPossibleValues().stream().map(e -> Direction.valueOf(((StringRepresentable) e).getSerializedName().toUpperCase(Locale.ROOT))).collect(Collectors.toList())); + property = new DirectionalProperty( + state.getName(), + (List) state + .getPossibleValues() + .stream() + .map(e -> Direction.valueOf(((StringRepresentable) e) + .getSerializedName() + .toUpperCase(Locale.ROOT))) + .collect(Collectors.toList()) + ); } else if (state instanceof net.minecraft.world.level.block.state.properties.EnumProperty) { - property = new EnumProperty(state.getName(), - (List) state.getPossibleValues().stream().map(e -> ((StringRepresentable) e).getSerializedName()).collect(Collectors.toList())); + property = new EnumProperty( + state.getName(), + (List) state + .getPossibleValues() + .stream() + .map(e -> ((StringRepresentable) e).getSerializedName()) + .collect(Collectors.toList()) + ); } else if (state instanceof net.minecraft.world.level.block.state.properties.IntegerProperty) { property = new IntegerProperty(state.getName(), ImmutableList.copyOf(state.getPossibleValues())); } else { @@ -536,7 +553,8 @@ public final class PaperweightAdapter implements BukkitImplAdapter { } fakePlayer.setItemInHand(InteractionHand.MAIN_HAND, stack); fakePlayer.absMoveTo(position.getBlockX(), position.getBlockY(), position.getBlockZ(), - (float) face.toVector().toYaw(), (float) face.toVector().toPitch()); + (float) face.toVector().toYaw(), (float) face.toVector().toPitch() + ); final BlockPos blockPos = new BlockPos(position.getBlockX(), position.getBlockY(), position.getBlockZ()); final Vec3 blockVec = Vec3.atLowerCornerOf(blockPos); @@ -545,7 +563,10 @@ public final class PaperweightAdapter implements BukkitImplAdapter { UseOnContext context = new UseOnContext(fakePlayer, InteractionHand.MAIN_HAND, rayTrace); InteractionResult result = stack.placeItem(context, InteractionHand.MAIN_HAND); if (result != InteractionResult.SUCCESS) { - if (worldServer.getBlockState(blockPos).use(worldServer, fakePlayer, InteractionHand.MAIN_HAND, rayTrace).consumesAction()) { + if (worldServer + .getBlockState(blockPos) + .use(worldServer, fakePlayer, InteractionHand.MAIN_HAND, rayTrace) + .consumesAction()) { result = InteractionResult.SUCCESS; } else { result = stack.getItem().use(worldServer, fakePlayer, InteractionHand.MAIN_HAND).getResult(); @@ -559,7 +580,10 @@ public final class PaperweightAdapter implements BukkitImplAdapter { public boolean canPlaceAt(org.bukkit.World world, BlockVector3 position, BlockState blockState) { int internalId = BlockStateIdAccess.getBlockStateId(blockState); net.minecraft.world.level.block.state.BlockState blockData = Block.stateById(internalId); - return blockData.canSurvive(((CraftWorld) world).getHandle(), new BlockPos(position.getX(), position.getY(), position.getZ())); + return blockData.canSurvive( + ((CraftWorld) world).getHandle(), + new BlockPos(position.getX(), position.getY(), position.getZ()) + ); } @Override @@ -661,7 +685,11 @@ public final class PaperweightAdapter implements BukkitImplAdapter { } @SuppressWarnings("unchecked") - private Dynamic recursivelySetSeed(Dynamic dynamic, long seed, Set> seen) { + private Dynamic recursivelySetSeed( + Dynamic dynamic, + long seed, + Set> seen + ) { if (!seen.add(dynamic)) { return dynamic; } @@ -685,7 +713,8 @@ public final class PaperweightAdapter implements BukkitImplAdapter { } @SuppressWarnings("unchecked") - private void regenForWorld(Region region, Extent extent, ServerLevel serverWorld, RegenOptions options) throws WorldEditException { + private void regenForWorld(Region region, Extent extent, ServerLevel serverWorld, RegenOptions options) throws + WorldEditException { List> chunkLoadings = submitChunkLoadTasks(region, serverWorld); BlockableEventLoop executor; try { @@ -858,7 +887,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { * * @param foreign the foreign tag * @return the converted tag - * @throws SecurityException on error + * @throws SecurityException on error * @throws IllegalArgumentException on error */ private ListTag toNativeList(net.minecraft.nbt.ListTag foreign) throws SecurityException, IllegalArgumentException { @@ -935,6 +964,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { } private class SpigotWatchdog implements Watchdog { + private final Field instanceField; private final Field lastTickField; @@ -959,9 +989,11 @@ public final class PaperweightAdapter implements BukkitImplAdapter { logger.log(Level.WARNING, "Failed to tick watchdog", e); } } + } private static class MojangWatchdog implements Watchdog { + private final DedicatedServer server; private final Field tickField; @@ -981,9 +1013,11 @@ public final class PaperweightAdapter implements BukkitImplAdapter { } catch (IllegalAccessException ignored) { } } + } private static class NoOpWorldLoadListener implements ChunkProgressListener { + @Override public void updateSpawnPos(ChunkPos spawnPos) { } @@ -1003,5 +1037,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter { @Override public void setChunkRadius(int radius) { } + } + } diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightDataConverters.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightDataConverters.java index 195187267..b21fa7dde 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightDataConverters.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightDataConverters.java @@ -49,6 +49,7 @@ import net.minecraft.world.item.DyeColor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import javax.annotation.Nullable; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.EnumMap; @@ -62,20 +63,19 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.Executor; import java.util.stream.Collectors; -import javax.annotation.Nullable; /** * Handles converting all Pre 1.13.2 data using the Legacy DataFix System (ported to 1.13.2) - * + *

* We register a DFU Fixer per Legacy Data Version and apply the fixes using legacy strategy * which is safer, faster and cleaner code. - * + *

* The pre DFU code did not fail when the Source version was unknown. - * + *

* This class also provides util methods for converting compounds to wrap the update call to * receive the source version in the compound */ -@SuppressWarnings({ "rawtypes", "unchecked" }) +@SuppressWarnings({"rawtypes", "unchecked"}) class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.worldedit.world.DataFixer { @SuppressWarnings("unchecked") @@ -118,7 +118,12 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo private String fixBlockState(String blockState, int srcVer) { net.minecraft.nbt.CompoundTag stateNBT = stateToNBT(blockState); Dynamic dynamic = new Dynamic<>(OPS_NBT, stateNBT); - net.minecraft.nbt.CompoundTag fixed = (net.minecraft.nbt.CompoundTag) INSTANCE.fixer.update(References.BLOCK_STATE, dynamic, srcVer, DATA_VERSION).getValue(); + net.minecraft.nbt.CompoundTag fixed = (net.minecraft.nbt.CompoundTag) INSTANCE.fixer.update( + References.BLOCK_STATE, + dynamic, + srcVer, + DATA_VERSION + ).getValue(); return nbtToState(fixed); } @@ -128,7 +133,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo if (tagCompound.contains("Properties", 10)) { sb.append('['); net.minecraft.nbt.CompoundTag props = tagCompound.getCompound("Properties"); - sb.append(props.getAllKeys().stream().map(k -> k + "=" + props.getString(k).replace("\"", "")).collect(Collectors.joining(","))); + sb.append(props + .getAllKeys() + .stream() + .map(k -> k + "=" + props.getString(k).replace("\"", "")) + .collect(Collectors.joining(","))); sb.append(']'); } return sb.toString(); @@ -220,6 +229,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo @SuppressWarnings("unchecked") private class WrappedDataFixer implements DataFixer { + private final DataFixer realFixer; WrappedDataFixer(DataFixer realFixer) { @@ -240,7 +250,12 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return realFixer.update(type, dynamic, sourceVer, targetVer); } - private net.minecraft.nbt.CompoundTag convert(LegacyType type, net.minecraft.nbt.CompoundTag cmp, int sourceVer, int desiredVersion) { + private net.minecraft.nbt.CompoundTag convert( + LegacyType type, + net.minecraft.nbt.CompoundTag cmp, + int sourceVer, + int desiredVersion + ) { List converters = PaperweightDataConverters.this.converters.get(type); if (converters != null && !converters.isEmpty()) { for (DataConverter converter : converters) { @@ -265,6 +280,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo public Schema getSchema(int i) { return realFixer.getSchema(i); } + } public static net.minecraft.nbt.CompoundTag convert(LegacyType type, net.minecraft.nbt.CompoundTag cmp) { @@ -275,7 +291,12 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return convert(type.getDFUType(), cmp, sourceVer); } - public static net.minecraft.nbt.CompoundTag convert(LegacyType type, net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { + public static net.minecraft.nbt.CompoundTag convert( + LegacyType type, + net.minecraft.nbt.CompoundTag cmp, + int sourceVer, + int targetVer + ) { return convert(type.getDFUType(), cmp, sourceVer, targetVer); } @@ -288,16 +309,25 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return convert(type, cmp, sourceVer, DATA_VERSION); } - public static net.minecraft.nbt.CompoundTag convert(TypeReference type, net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { + public static net.minecraft.nbt.CompoundTag convert( + TypeReference type, + net.minecraft.nbt.CompoundTag cmp, + int sourceVer, + int targetVer + ) { if (sourceVer >= targetVer) { return cmp; } - return (net.minecraft.nbt.CompoundTag) INSTANCE.fixer.update(type, new Dynamic<>(OPS_NBT, cmp), sourceVer, targetVer).getValue(); + return (net.minecraft.nbt.CompoundTag) INSTANCE.fixer + .update(type, new Dynamic<>(OPS_NBT, cmp), sourceVer, targetVer) + .getValue(); } public interface DataInspector { + net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer); + } public interface DataConverter { @@ -305,6 +335,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo int getDataVersion(); net.minecraft.nbt.CompoundTag convert(net.minecraft.nbt.CompoundTag cmp); + } @@ -582,7 +613,13 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return key; } - private static void convertCompound(LegacyType type, net.minecraft.nbt.CompoundTag cmp, String key, int sourceVer, int targetVer) { + private static void convertCompound( + LegacyType type, + net.minecraft.nbt.CompoundTag cmp, + String key, + int sourceVer, + int targetVer + ) { cmp.put(key, convert(type, cmp.getCompound(key), sourceVer, targetVer)); } @@ -658,6 +695,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorBlockEntity implements DataInspector { @@ -840,6 +878,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } @@ -859,7 +898,12 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } - abstract net.minecraft.nbt.CompoundTag inspectChecked(net.minecraft.nbt.CompoundTag nbttagcompound, int sourceVer, int targetVer); + abstract net.minecraft.nbt.CompoundTag inspectChecked( + net.minecraft.nbt.CompoundTag nbttagcompound, + int sourceVer, + int targetVer + ); + } private static class DataInspectorItemList extends DataInspectorTagged { @@ -878,6 +922,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return nbttagcompound; } + } private static class DataInspectorItem extends DataInspectorTagged { @@ -896,6 +941,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return nbttagcompound; } + } private static class DataConverterMaterialId implements DataConverter { @@ -1296,6 +1342,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterBanner implements DataConverter { @@ -1342,6 +1389,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterPotionId implements DataConverter { @@ -1619,7 +1667,15 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo private static class DataConverterMinecart implements DataConverter { - private static final List a = Lists.newArrayList("MinecartRideable", "MinecartChest", "MinecartFurnace", "MinecartTNT", "MinecartSpawner", "MinecartHopper", "MinecartCommandBlock"); + private static final List a = Lists.newArrayList( + "MinecartRideable", + "MinecartChest", + "MinecartFurnace", + "MinecartTNT", + "MinecartSpawner", + "MinecartHopper", + "MinecartCommandBlock" + ); DataConverterMinecart() { } @@ -1643,6 +1699,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterMobSpawner implements DataConverter { @@ -1687,6 +1744,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } } + } private static class DataConverterUUID implements DataConverter { @@ -1705,11 +1763,47 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterHealth implements DataConverter { - private static final Set a = Sets.newHashSet("ArmorStand", "Bat", "Blaze", "CaveSpider", "Chicken", "Cow", "Creeper", "EnderDragon", "Enderman", "Endermite", "EntityHorse", "Ghast", "Giant", "Guardian", "LavaSlime", "MushroomCow", "Ozelot", "Pig", "PigZombie", "Rabbit", "Sheep", "Shulker", "Silverfish", "Skeleton", "Slime", "SnowMan", "Spider", "Squid", "Villager", "VillagerGolem", "Witch", "WitherBoss", "Wolf", "Zombie"); + private static final Set a = Sets.newHashSet( + "ArmorStand", + "Bat", + "Blaze", + "CaveSpider", + "Chicken", + "Cow", + "Creeper", + "EnderDragon", + "Enderman", + "Endermite", + "EntityHorse", + "Ghast", + "Giant", + "Guardian", + "LavaSlime", + "MushroomCow", + "Ozelot", + "Pig", + "PigZombie", + "Rabbit", + "Sheep", + "Shulker", + "Silverfish", + "Skeleton", + "Slime", + "SnowMan", + "Spider", + "Squid", + "Villager", + "VillagerGolem", + "Witch", + "WitherBoss", + "Wolf", + "Zombie" + ); DataConverterHealth() { } @@ -1738,6 +1832,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterSaddle implements DataConverter { @@ -1762,6 +1857,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterHanging implements DataConverter { @@ -1800,6 +1896,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterDropChances implements DataConverter { @@ -1823,13 +1920,15 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo if (cmp.contains("ArmorDropChances", 9)) { nbttaglist = cmp.getList("ArmorDropChances", 5); - if (nbttaglist.size() == 4 && nbttaglist.getFloat(0) == 0.0F && nbttaglist.getFloat(1) == 0.0F && nbttaglist.getFloat(2) == 0.0F && nbttaglist.getFloat(3) == 0.0F) { + if (nbttaglist.size() == 4 && nbttaglist.getFloat(0) == 0.0F && nbttaglist.getFloat(1) == 0.0F && nbttaglist.getFloat( + 2) == 0.0F && nbttaglist.getFloat(3) == 0.0F) { cmp.remove("ArmorDropChances"); } } return cmp; } + } private static class DataConverterRiding implements DataConverter { @@ -1865,6 +1964,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo nbttagcompound.remove("Riding"); return nbttagcompound1; } + } private static class DataConverterBook implements DataConverter { @@ -1933,6 +2033,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterCookedFish implements DataConverter { @@ -1953,6 +2054,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterZombie implements DataConverter { @@ -1995,6 +2097,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo private int convert(int i) { return i >= 0 && i < 6 ? i : -1; } + } private static class DataConverterVBO implements DataConverter { @@ -2010,6 +2113,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo cmp.putString("useVbo", "true"); return cmp; } + } private static class DataConverterGuardian implements DataConverter { @@ -2032,6 +2136,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterSkeleton implements DataConverter { @@ -2060,6 +2165,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterZombieType implements DataConverter { @@ -2098,6 +2204,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterHorse implements DataConverter { @@ -2140,6 +2247,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterTileEntity implements DataConverter { @@ -2302,7 +2410,8 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo public net.minecraft.nbt.CompoundTag convert(net.minecraft.nbt.CompoundTag cmp) { String s = cmp.getString("id"); - if ("minecraft:potion".equals(s) || "minecraft:splash_potion".equals(s) || "minecraft:lingering_potion".equals(s) || "minecraft:tipped_arrow".equals(s)) { + if ("minecraft:potion".equals(s) || "minecraft:splash_potion".equals(s) || "minecraft:lingering_potion".equals(s) || "minecraft:tipped_arrow".equals( + s)) { net.minecraft.nbt.CompoundTag nbttagcompound1 = cmp.getCompound("tag"); if (!nbttagcompound1.contains("Potion", 8)) { @@ -2316,6 +2425,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterShulker implements DataConverter { @@ -2334,11 +2444,12 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterShulkerBoxItem implements DataConverter { - public static final String[] a = new String[] { "minecraft:white_shulker_box", "minecraft:orange_shulker_box", "minecraft:magenta_shulker_box", "minecraft:light_blue_shulker_box", "minecraft:yellow_shulker_box", "minecraft:lime_shulker_box", "minecraft:pink_shulker_box", "minecraft:gray_shulker_box", "minecraft:silver_shulker_box", "minecraft:cyan_shulker_box", "minecraft:purple_shulker_box", "minecraft:blue_shulker_box", "minecraft:brown_shulker_box", "minecraft:green_shulker_box", "minecraft:red_shulker_box", "minecraft:black_shulker_box" }; + public static final String[] a = new String[]{"minecraft:white_shulker_box", "minecraft:orange_shulker_box", "minecraft:magenta_shulker_box", "minecraft:light_blue_shulker_box", "minecraft:yellow_shulker_box", "minecraft:lime_shulker_box", "minecraft:pink_shulker_box", "minecraft:gray_shulker_box", "minecraft:silver_shulker_box", "minecraft:cyan_shulker_box", "minecraft:purple_shulker_box", "minecraft:blue_shulker_box", "minecraft:brown_shulker_box", "minecraft:green_shulker_box", "minecraft:red_shulker_box", "minecraft:black_shulker_box"}; DataConverterShulkerBoxItem() { } @@ -2375,6 +2486,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterShulkerBoxBlock implements DataConverter { @@ -2393,6 +2505,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterLang implements DataConverter { @@ -2411,6 +2524,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterTotem implements DataConverter { @@ -2429,6 +2543,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterBedBlock implements DataConverter { @@ -2476,6 +2591,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterBedItem implements DataConverter { @@ -2494,12 +2610,14 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataConverterSignText implements DataConverter { public static final Gson a = new GsonBuilder().registerTypeAdapter(Component.class, new JsonDeserializer() { - MutableComponent a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { + MutableComponent a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws + JsonParseException { if (jsonelement.isJsonPrimitive()) { return new TextComponent(jsonelement.getAsString()); } else if (jsonelement.isJsonArray()) { @@ -2509,7 +2627,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo while (iterator.hasNext()) { JsonElement jsonelement1 = (JsonElement) iterator.next(); - MutableComponent ichatbasecomponent1 = this.a(jsonelement1, jsonelement1.getClass(), jsondeserializationcontext); + MutableComponent ichatbasecomponent1 = this.a( + jsonelement1, + jsonelement1.getClass(), + jsondeserializationcontext + ); if (ichatbasecomponent == null) { ichatbasecomponent = ichatbasecomponent1; @@ -2524,7 +2646,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo } } - public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { + public Object deserialize( + JsonElement jsonelement, + Type type, + JsonDeserializationContext jsondeserializationcontext + ) throws JsonParseException { return this.a(jsonelement, type, jsondeserializationcontext); } }).create(); @@ -2590,9 +2716,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo nbttagcompound.putString(s, Component.Serializer.toJson(object)); } + } private static class DataInspectorPlayerVehicle implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { if (cmp.contains("RootVehicle", 10)) { @@ -2605,9 +2733,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorLevelPlayer implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { if (cmp.contains("Player", 10)) { @@ -2616,9 +2746,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorStructure implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { net.minecraft.nbt.ListTag nbttaglist; @@ -2649,9 +2781,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorChunks implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { if (cmp.contains("Level", 10)) { @@ -2663,7 +2797,15 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo nbttaglist = nbttagcompound1.getList("Entities", 10); for (j = 0; j < nbttaglist.size(); ++j) { - nbttaglist.set(j, convert(LegacyType.ENTITY, (net.minecraft.nbt.CompoundTag) nbttaglist.get(j), sourceVer, targetVer)); + nbttaglist.set( + j, + convert( + LegacyType.ENTITY, + (net.minecraft.nbt.CompoundTag) nbttaglist.get(j), + sourceVer, + targetVer + ) + ); } } @@ -2671,16 +2813,26 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo nbttaglist = nbttagcompound1.getList("TileEntities", 10); for (j = 0; j < nbttaglist.size(); ++j) { - nbttaglist.set(j, convert(LegacyType.BLOCK_ENTITY, (net.minecraft.nbt.CompoundTag) nbttaglist.get(j), sourceVer, targetVer)); + nbttaglist.set( + j, + convert( + LegacyType.BLOCK_ENTITY, + (net.minecraft.nbt.CompoundTag) nbttaglist.get(j), + sourceVer, + targetVer + ) + ); } } } return cmp; } + } private static class DataInspectorEntityPassengers implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { if (cmp.contains("Passengers", 9)) { @@ -2693,9 +2845,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorPlayer implements DataInspector { + @Override public net.minecraft.nbt.CompoundTag inspect(net.minecraft.nbt.CompoundTag cmp, int sourceVer, int targetVer) { convertItems(cmp, "Inventory", sourceVer, targetVer); @@ -2710,9 +2864,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorVillagers implements DataInspector { + ResourceLocation entityVillager = getKey("EntityVillager"); @Override @@ -2736,9 +2892,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorMobSpawnerMinecart implements DataInspector { + ResourceLocation entityMinecartMobSpawner = getKey("EntityMinecartMobSpawner"); ResourceLocation tileEntityMobSpawner = getKey("TileEntityMobSpawner"); @@ -2753,9 +2911,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorMobSpawnerMobs implements DataInspector { + ResourceLocation tileEntityMobSpawner = getKey("TileEntityMobSpawner"); @Override @@ -2776,9 +2936,11 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } private static class DataInspectorCommandBlock implements DataInspector { + ResourceLocation tileEntityCommand = getKey("TileEntityCommand"); @Override @@ -2791,5 +2953,7 @@ class PaperweightDataConverters extends DataFixerBuilder implements com.sk89q.wo return cmp; } + } + } diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightFakePlayer.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightFakePlayer.java index 1c2bc02a4..9f081b05e 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightFakePlayer.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightFakePlayer.java @@ -37,7 +37,11 @@ import java.util.OptionalInt; import java.util.UUID; class PaperweightFakePlayer extends ServerPlayer { - private static final GameProfile FAKE_WORLDEDIT_PROFILE = new GameProfile(UUID.nameUUIDFromBytes("worldedit".getBytes()), "[WorldEdit]"); + + private static final GameProfile FAKE_WORLDEDIT_PROFILE = new GameProfile( + UUID.nameUUIDFromBytes("worldedit".getBytes()), + "[WorldEdit]" + ); private static final Vec3 ORIGIN = new Vec3(0.0D, 0.0D, 0.0D); PaperweightFakePlayer(ServerLevel world) { @@ -95,4 +99,5 @@ class PaperweightFakePlayer extends ServerPlayer { @Override public void openTextEdit(SignBlockEntity sign) { } + } diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightWorldNativeAccess.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightWorldNativeAccess.java index bf4af5863..701e40b12 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightWorldNativeAccess.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightWorldNativeAccess.java @@ -35,11 +35,13 @@ import org.bukkit.craftbukkit.v1_17_R1.CraftWorld; import org.bukkit.craftbukkit.v1_17_R1.block.data.CraftBlockData; import org.bukkit.event.block.BlockPhysicsEvent; +import javax.annotation.Nullable; import java.lang.ref.WeakReference; import java.util.Objects; -import javax.annotation.Nullable; -public class PaperweightWorldNativeAccess implements WorldNativeAccess { +public class PaperweightWorldNativeAccess implements + WorldNativeAccess { + private static final int UPDATE = 1; private static final int NOTIFY = 2; @@ -81,12 +83,19 @@ public class PaperweightWorldNativeAccess implements WorldNativeAccess { Location tmpLoc = lastCancelPos; if (tmpLoc != null) { - LOGGER.info("[FAWE Tick Limiter] Detected and cancelled physics lag source at {}", tmpLoc); + LOGGER.info("[FAWE Tick Limiter] Detected and cancelled physics lag source at {}", tmpLoc); } rateLimit--; physicsFreeze = false; diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java index e45b7ed3e..82b962061 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java @@ -7,7 +7,6 @@ import com.fastasyncworldedit.core.regions.FaweMaskManager; import com.fastasyncworldedit.core.regions.filter.RegionFilter; import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; import com.plotsquared.core.PlotSquared; -import com.plotsquared.core.command.MainCommand; import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.database.DBFunc; import com.plotsquared.core.player.PlotPlayer; diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/UpdateNotification.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/UpdateNotification.java index c366c2a5d..8ac088d90 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/UpdateNotification.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/UpdateNotification.java @@ -16,7 +16,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import java.net.URL; /** - * @hidden + * */ public class UpdateNotification { diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/Refraction.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/Refraction.java index ab1e4f828..025700ace 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/Refraction.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/Refraction.java @@ -23,6 +23,7 @@ package com.sk89q.worldedit.bukkit.adapter; * Reflection helper to deal with obfuscation. */ public class Refraction { + private static final String MOJANG_MAPPED_CLASS_NAME = "net.minecraft.nbt.ListTag"; private static final boolean IS_MOJANG_MAPPED; @@ -43,4 +44,5 @@ public class Refraction { private Refraction() { } + } diff --git a/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java b/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java index 3b3de8cd3..864f82a9f 100644 --- a/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java +++ b/worldedit-bukkit/src/test/java/com/fastasyncworldedit/util/StubServer.java @@ -911,8 +911,7 @@ public class StubServer implements Server { } @Override - public @NotNull - Iterable> getTags(@NotNull String s, @NotNull Class aClass) { + public @NotNull Iterable> getTags(@NotNull String s, @NotNull Class aClass) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweVersion.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweVersion.java index 591000c59..344a9d401 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweVersion.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweVersion.java @@ -2,8 +2,6 @@ package com.fastasyncworldedit.core; /** * An internal FAWE class not meant for public use. - * - * @hidden **/ public class FaweVersion { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java index fb11bf4e4..67a401c3c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/CatenaryBrush.java @@ -3,7 +3,6 @@ package com.fastasyncworldedit.core.command.tool.brush; import com.fastasyncworldedit.core.FaweCache; import com.fastasyncworldedit.core.command.tool.ResettableTool; import com.fastasyncworldedit.core.configuration.Caption; -import com.fastasyncworldedit.core.internal.exception.FaweException; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.command.tool.brush.Brush; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java index 7d786177f..aa6d4dda0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java @@ -331,7 +331,7 @@ public class Config { /** * Get the field for a specific config node and instance. - * + *

* As expiry can have multiple blocks there will be multiple instances * * @param split the node (split by period) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java index eca812058..4d627cec0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java @@ -228,6 +228,7 @@ public class Settings extends Config { " - \"extended[true:false]\"" }) public List REMAP_PROPERTIES = new ArrayList<>(); + } public static class HISTORY { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/DisallowedBlocksExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/DisallowedBlocksExtent.java index 35db842f4..d12c97343 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/DisallowedBlocksExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/DisallowedBlocksExtent.java @@ -154,7 +154,7 @@ public class DisallowedBlocksExtent extends AbstractDelegateExtent implements IB } } if (remaps == null || remaps.isEmpty()) { - blocks[i] = block; + blocks[i] = block; continue; } for (PropertyRemap remap : remaps) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/MemoryCheckingExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/MemoryCheckingExtent.java index 0d93b9529..a4398dc69 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/MemoryCheckingExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/MemoryCheckingExtent.java @@ -5,7 +5,6 @@ import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.MemUtil; import com.fastasyncworldedit.core.util.Permission; import com.fastasyncworldedit.core.util.WEManager; -import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extent.Extent; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/SimpleClipboard.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/SimpleClipboard.java index 56ed562f6..8847d0434 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/SimpleClipboard.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/SimpleClipboard.java @@ -12,6 +12,7 @@ public abstract class SimpleClipboard implements Clipboard { private final int volume; private BlockVector3 offset; private BlockVector3 origin; + SimpleClipboard(BlockVector3 dimensions, BlockVector3 offset) { this.size = dimensions; this.offset = offset; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractDelegateChangeSet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractDelegateChangeSet.java index 0f9f6c6ad..ad3173fd6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractDelegateChangeSet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractDelegateChangeSet.java @@ -2,7 +2,6 @@ package com.fastasyncworldedit.core.history.changeset; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.history.change.BlockChange; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/UnsafeUtility.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/UnsafeUtility.java index 34750c533..a6c95fb8e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/UnsafeUtility.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/UnsafeUtility.java @@ -6,7 +6,6 @@ import java.lang.reflect.Field; /** * This is an internal class not meant to be used outside the FAWE internals. - * @hidden */ public class UnsafeUtility { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index cc057728e..b99d98f90 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -45,12 +45,12 @@ import com.fastasyncworldedit.core.function.pattern.ExistingPattern; import com.fastasyncworldedit.core.function.visitor.DirectionalVisitor; import com.fastasyncworldedit.core.history.changeset.AbstractChangeSet; import com.fastasyncworldedit.core.history.changeset.BlockBagChangeSet; +import com.fastasyncworldedit.core.limit.FaweLimit; import com.fastasyncworldedit.core.math.LocalBlockVectorSet; import com.fastasyncworldedit.core.math.MutableBlockVector2; import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.fastasyncworldedit.core.math.MutableVector3; import com.fastasyncworldedit.core.math.random.SimplexNoise; -import com.fastasyncworldedit.core.limit.FaweLimit; import com.fastasyncworldedit.core.queue.implementation.preloader.Preloader; import com.fastasyncworldedit.core.regions.RegionWrapper; import com.fastasyncworldedit.core.util.ExtentTraverser; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java index 26b1b4856..fb38799a1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java @@ -52,9 +52,9 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.clipboard.MultiClipboardHolder; import com.fastasyncworldedit.core.function.mask.IdMask; import com.fastasyncworldedit.core.function.mask.SingleBlockTypeMask; +import com.fastasyncworldedit.core.limit.FaweLimit; import com.fastasyncworldedit.core.math.heightmap.ScalableHeightMap; import com.fastasyncworldedit.core.math.heightmap.ScalableHeightMap.Shape; -import com.fastasyncworldedit.core.limit.FaweLimit; import com.fastasyncworldedit.core.util.MainUtil; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.StringMan; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java index 49d1e9aeb..f65b94cfd 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java @@ -39,7 +39,6 @@ import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.util.formatting.component.PaginationBox; import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; import com.sk89q.worldedit.util.formatting.text.event.ClickEvent; import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.world.World; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java index 3c05e0668..188610af3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java @@ -36,7 +36,6 @@ import com.sk89q.worldedit.command.argument.Arguments; import com.sk89q.worldedit.command.util.AsyncCommandBuilder; import com.sk89q.worldedit.command.util.CommandPermissions; import com.sk89q.worldedit.command.util.CommandPermissionsConditionGenerator; -import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Capability; import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java index ddfbdfd74..0532227d1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java @@ -513,15 +513,20 @@ public class DefaultBlockParser extends InputParser { if (actor != null) { if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().disallowedBlocks.contains(blockType.getId().toLowerCase(Locale.ROOT))) { - throw new DisallowedUsageException(Caption.of("worldedit.error.disallowed-block", TextComponent.of(blockType.getId()))); + throw new DisallowedUsageException(Caption.of( + "worldedit.error.disallowed-block", + TextComponent.of(blockType.getId()) + )); } FaweLimit limit = actor.getLimit(); if (!limit.isUnlimited()) { // No need to account for blocked states/properties as it will simply return false in the equality check // during contains. if (limit.DISALLOWED_BLOCKS.contains(blockType.getId().toLowerCase(Locale.ROOT))) { - throw new DisallowedUsageException(Caption.of("fawe.error.limit.disallowed-block", - TextComponent.of(blockType.getId()))); + throw new DisallowedUsageException(Caption.of( + "fawe.error.limit.disallowed-block", + TextComponent.of(blockType.getId()) + )); } } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptContext.java b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptContext.java index 77a6b3354..8eb6df755 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptContext.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptContext.java @@ -159,9 +159,9 @@ public class CraftScriptContext extends CraftScriptEnvironment { /** * Immediately terminate execution of the script, but without a failure message. - * + *

* This exits by throwing an exception, which if caught will prevent - * the script from exiting + * the script from exiting */ public void exit() { throw new ReturnException(null); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index 3afa293d8..e311fe3bc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -344,7 +344,10 @@ public class BlockState implements BlockStateHolder, Pattern { //FAWE end BlockType type = this.getBlockType(); // Lazily initialize the map - Map, Object> map = Maps.asMap(type.getPropertiesSet(), (Function, Object>) this::getState); + Map, Object> map = Maps.asMap( + type.getPropertiesSet(), + (Function, Object>) this::getState + ); //noinspection RedundantCast - This is required for compilation, etc. return Collections.unmodifiableMap((Map, Object>) map); //FAWE end diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java index e1d9fd123..5f6667a13 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java @@ -166,8 +166,8 @@ public interface BlockStateHolder> extends TileEnt * * @param compoundTag The NBT Data to apply * @return The BaseBlock - * This must be overridden by new subclasses. See {@link NonAbstractForCompatibility} - * for details + * This must be overridden by new subclasses. See {@link NonAbstractForCompatibility} + * for details */ @NonAbstractForCompatibility( delegateName = "toBaseBlock", diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/Chunk.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/Chunk.java index 5f8ab2f9f..8ca0d6038 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/Chunk.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/Chunk.java @@ -20,16 +20,13 @@ package com.sk89q.worldedit.world.chunk; import com.sk89q.worldedit.entity.BaseEntity; -import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.math.BlockVector3; -import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.DataException; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; import java.util.Collections; import java.util.List; -import java.util.Map; /** * A 16 by 16 block chunk. @@ -46,6 +43,7 @@ public interface Chunk { BaseBlock getBlock(BlockVector3 position) throws DataException; //FAWE start - biome and entity restore + /** * Get a biome. * @@ -59,6 +57,7 @@ public interface Chunk { /** * Get the stored entities. + * * @return list of stored entities */ default List getEntities() throws DataException { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java index 271feab78..f53e81190 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java @@ -149,8 +149,10 @@ public final class LegacyMapper { // if it's still null, both fixer and default failed if (state == null) { - LOGGER.error("Unknown block: {}. Neither the DataFixer nor defaulting worked to recognize this block.", - value); + LOGGER.error( + "Unknown block: {}. Neither the DataFixer nor defaulting worked to recognize this block.", + value + ); } else { // it's not null so one of them succeeded, now use it blockToStringMap.put(state, id); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRestore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRestore.java index 1fb58d434..9b3a217b1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRestore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRestore.java @@ -28,8 +28,6 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.util.Location; -import com.sk89q.worldedit.util.nbt.BinaryTag; -import com.sk89q.worldedit.util.nbt.BinaryTagTypes; import com.sk89q.worldedit.util.nbt.CompoundBinaryTag; import com.sk89q.worldedit.util.nbt.ListBinaryTag; import com.sk89q.worldedit.world.DataException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStore.java index 1996148e3..6b8de78fc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStore.java @@ -87,6 +87,7 @@ public abstract class ChunkStore implements Closeable { public abstract CompoundTag getChunkTag(BlockVector2 position, World world) throws DataException, IOException; //FAWE start - biome and entity restore + /** * Get the tag for the entities stored in a chunk from the entities folder. 1.17+ use only. * If an error occurs, returns null. diff --git a/worldedit-core/src/main/resources/lang/strings.json b/worldedit-core/src/main/resources/lang/strings.json index e6d76068d..075129a14 100644 --- a/worldedit-core/src/main/resources/lang/strings.json +++ b/worldedit-core/src/main/resources/lang/strings.json @@ -1,680 +1,622 @@ { - "prefix": "&8(&4&lFAWE&8)&7 {0}", - - "fawe.worldedit.history.find.element": "&2{0} {1} &7ago &3{2}m &6{3} &c/{4}", - "fawe.worldedit.history.find.element.more": " - Changes: {0}\n - Bounds: {1} -> {2}\n - Extra: {3}\n - Size on Disk: {4}", - "fawe.worldedit.history.find.hover": "{0} blocks changed, click for more info", - "fawe.worldedit.history.distr.summary_null": "Could not find edit summary for inputs.", - - "fawe.info.lighting.propagate.selection": "Lighting has been propagated in {0} chunks. (Note: To remove light use //removelight)", - "fawe.info.updated.lighting.selection": "Lighting has been updated in {0} chunks. (It may take a second for the packets to send)", - "fawe.info.set.region": "Selection set to your current allowed region", - - "fawe.info.worldedit.toggle.tips.on": "Disabled FAWE tips.", - "fawe.info.worldedit.toggle.tips.off": "Enabled FAWE tips.", - "fawe.info.worldedit.bypassed": "Currently bypassing FAWE restriction.", - "fawe.info.worldedit.restricted": "Your FAWE edits are now restricted.", - "fawe.info.worldedit.oom.admin": "Possible options:\n - //fast\n - Do smaller edits\n - Allocate more memory\n - Disable `max-memory-percent`", - "fawe.info.temporarily-not-working": "Temporarily not working", - "fawe.info.update-available": "An update for FastAsyncWorldEdit is available. You are {0} build(s) out of date.\nYou are running version {1}, the latest version is {2}.\nUpdate at {3}", - - "fawe.web.generating.link": "Uploading {0}, please wait...", - "fawe.web.generating.link.failed": "Failed to generate download link!", - "fawe.web.download.link": "{0}", - - "fawe.worldedit.general.texture.disabled": "Texturing reset", - "fawe.worldedit.general.texture.set": "Set texturing to {1}", - "fawe.worldedit.general.source.mask.disabled": "Global source mask disabled", - "fawe.worldedit.general.source.mask": "Global source mask set", - "fawe.worldedit.general.transform.disabled": "Global transform disabled", - "fawe.worldedit.general.transform": "Global transform set", - - "fawe.worldedit.copy.command.copy": "{0} blocks were copied.", - - "fawe.worldedit.cut.command.cut.lazy": "{0} blocks will be removed on paste", - - "fawe.worldedit.paste.command.paste": "The clipboard has been pasted at {0}", - - "fawe.worldedit.history.command.undo.disabled": "Undo disabled, use: //fast", - - "fawe.worldedit.selection.selection.count": "Counted {0} blocks.", - - "fawe.worldedit.anvil.world.is.loaded": "The world shouldn't be in use when executing. Unload the world, or use -f to override (save first)", - - "fawe.worldedit.brush.brush.reset": "Reset your brush. (SHIFT + Click)", - "fawe.worldedit.brush.brush.none": "You aren't holding a brush!", - "fawe.worldedit.brush.brush.scroll.action.set": "Set scroll action to {0}", - "fawe.worldedit.brush.brush.scroll.action.unset": "Removed scroll action", - "fawe.worldedit.brush.brush.visual.mode.set": "Set visual mode to {0}", - "fawe.worldedit.brush.brush.target.mode.set": "Set target mode to {0}", - "fawe.worldedit.brush.brush.target.offset.set": "Set target offset to {0}", - "fawe.worldedit.brush.brush.equipped": "Equipped brush {0}", - "fawe.worldedit.brush.brush.try.other": "There are other more suitable brushes e.g.,\n - //br height [radius=5] [#clipboard|file=null] [rotation=0] [yscale=1.00]", - "fawe.worldedit.brush.brush.copy": "Left click the base of an object to copy, right click to paste. Increase the brush radius if necessary.", - "fawe.worldedit.brush.brush.height.invalid": "Invalid height map file ({0})", - "fawe.worldedit.brush.brush.spline": "Click to add a point, click the same spot to finish", - "fawe.worldedit.brush.brush.line.primary": "Added point {0}, click another position to create the line", - "fawe.worldedit.brush.brush.catenary.direction": "Added point {0}, click the direction you want to create the spline", - "fawe.worldedit.brush.brush.line.secondary": "Created spline", - "fawe.worldedit.brush.spline.primary.2": "Added position, Click the same spot to join!", - "fawe.worldedit.brush.brush.spline.secondary.error": "Not enough positions set!", - "fawe.worldedit.brush.spline.secondary": "Created spline", - "fawe.worldedit.brush.brush.source.mask.disabled": "Brush source mask disabled", - "fawe.worldedit.brush.brush.source.mask": "Brush source mask set", - "fawe.worldedit.brush.brush.transform.disabled": "Brush transform disabled", - "fawe.worldedit.brush.brush.transform": "Brush transform set", - - "fawe.worldedit.rollback.rollback.element": "Undoing {0}", - - "fawe.worldedit.tool.tool.inspect": "Inspect tool bound to {0}.", - "fawe.worldedit.tool.tool.inspect.info": "{0} changed {1} to {2} {3} ago", - "fawe.worldedit.tool.tool.inspect.info.footer": "Total: {0} changes", - "fawe.worldedit.tool.tool.range.error": "Maximum range: {0}.", - "fawe.worldedit.tool.tool.lrbuild.info": "Left-click set to {0}; right-click set to {1}.", - - "fawe.worldedit.utility.nothing.confirmed": "You have no actions pending confirmation.", - - "fawe.worldedit.schematic.schematic.move.exists": "{0} already exists", - "fawe.worldedit.schematic.schematic.move.success": "{0} -> {1}", - "fawe.worldedit.schematic.schematic.move.failed": "{0} no moved: {1}", - "fawe.worldedit.schematic.schematic.loaded": "{0} loaded. Paste it with //paste", - "fawe.worldedit.schematic.schematic.saved": "{0} saved.", - - "fawe.worldedit.schematic.schematic.none": "No files found.", - - "fawe.worldedit.clipboard.clipboard.uri.not.found": "You do not have {0} loaded", - "fawe.worldedit.clipboard.clipboard.cleared": "Clipboard cleared", - "fawe.worldedit.clipboard.clipboard.invalid.format": "Unknown clipboard format: {0}", - - "fawe.worldedit.visitor.visitor.block": "{0} blocks affected", - - "fawe.worldedit.selector.selector.fuzzy.pos1": "Region set and expanded from {0} {1}.", - "fawe.worldedit.selector.selector.fuzzy.pos2": "Added expansion of {0} {1}.", - - "fawe.progress.progress.message": "{1}/{0} ({2}%) @{3}cps {4}s left", - "fawe.progress.progress.finished": "[ Done! ]", - - "fawe.error.command.syntax": "Usage: {0}", - "fawe.error.no-perm": "You are lacking the permission node: {0}", - "fawe.error.block.not.allowed": "You are not allowed to use: {0}", - "fawe.error.setting.disable": "Lacking setting: {0}", - "fawe.error.brush.not.found": "Available brushes: {0}", - "fawe.error.brush.incompatible": "Brush not compatible with this version", - "fawe.error.no.region": "You have no current allowed region", - "fawe.error.player.not.found": "Player not found: {0}", - "fawe.error.worldedit.some.fails": "{0} blocks weren't placed because they were outside your allowed region.", - "fawe.error.worldedit.some.fails.blockbag": "Missing blocks: {0}", - "fawe.error.mask.angle": "Cannot combine degree with block-step", - "fawe.error.invalid-flag": "The flag {0} is not applicable here", - "fawe.error.lighting": "Error when attempting lighting. You may need to reload the chunks to see the edit.", - "fawe.error.parser.invalid-data": "Invalid data: {0}", - "fawe.error.unsupported": "Unsupported!", - "fawe.error.invalid-block-type": "Does not match a valid block type: {0}", - "fawe.error.nbt.forbidden": "You are not allowed to use nbt. Lacking permission: {0}", - "fawe.error.invalid-arguments": "Invalid amount of arguments. Expected: {0}", - "fawe.error.unrecognised-tag": "Unrecognised tag: {0} {1}", - "fawe.error.unknown-block-tag": "Unknown block tag: {0}", - "fawe.error.block-tag-no-blocks": "Block tag '{0}' had no blocks.", - "fawe.error.no-block-found": "No block found for '{0}'.", - "fawe.error.invalid-states": "Invalid states: {0}", - "fawe.error.no-session": "No session is available, so no clipboard is available.", - "fawe.error.empty-clipboard": "To use '{0}', please first copy something to your clipboard", - "fawe.error.selection-expand": "Selection cannot expand.", - "fawe.error.selection-contract": "Selection cannot expand.", - "fawe.error.selection-shift": "Selection cannot be shifted.", - "fawe.error.invalid-user": "User must be provided.", - "fawe.error.radius-too-small": "Radius must be >=0", - "fawe.error.time-too-less": "Time must be >=0", - "fawe.error.invalid-image": "Invalid image: {0}", - "fawe.error.file-not-found": "File not found: {0}", - "fawe.error.file-is-invalid-directory": "File is a directory: {0}", - "fawe.error.stacktrace": "===============---=============", - "fawe.error.no-failure": "This shouldn't result in any failure", - "fawe.error.invalid-bracketing": "Invalid bracketing, are you missing a '{0}'.", - "fawe.error.too-simple": "Complexity must be in the range 0-100", - "fawe.error.outside-range": "Argument {0} outside of range {1}-{2}.", - "fawe.error.outside-range-lower": "Argument {0} may not be less than {1}", - "fawe.error.outside-range-upper": "Argument {0} may not be greater than {1}", - "fawe.error.argument-size-mismatch": "Argument {0} may not be greater than argument {1}", - "fawe.error.input-parser-exception": "Invalid empty string instead of boolean.", - "fawe.error.invalid-boolean": "Invalid boolean {0}", - "fawe.error.schematic.not.found": "Schematic {0} not found.", - "fawe.error.parse.invalid-dangling-character": "Invalid dangling character {0}.", - "fawe.error.parse.unknown-mask": "Unknown mask: {0}, See: {1}", - "fawe.error.parse.unknown-pattern": "Unknown pattern: {0}, See: {1}", - "fawe.error.parse.unknown-transform": "Unknown transform: {0}, See: {1}", - "fawe.error.parse.no-clipboard": "To use {0}, please first copy something to your clipboard", - "fawe.error.parse.no-clipboard-source": "No clipboards found at given source: {0}", - "fawe.error.clipboard.invalid": "====== INVALID CLIPBOARD ======", - "fawe.error.clipboard.invalid.info": "File: {0} (len: {1})", - "fawe.error.clipboard.load.failure": "Could not load clipboard. Possible that the clipboard is still being written to from another server?!", - "fawe.error.clipboard.on.disk.version.mismatch": "Clipboard version mismatch. Please delete your clipboards folder and restart the server.", - "fawe.error.limit.disallowed-block": "Your limit disallows use of block '{0}'", - "fawe.error.limit.disallowed-property": "Your limit disallows use of property '{0}'", - - "fawe.cancel.count": "Cancelled {0} edits.", - "fawe.cancel.reason.confirm": "Use //confirm to execute {0}", - "fawe.cancel.reason.confirm.region": "Your selection is large ({0} -> {1}, containing {3} blocks). Use //confirm to execute {2}", - "fawe.cancel.reason.confirm.radius": "Your radius is large ({0} > {1}). Use //confirm to execute {2}", - "fawe.cancel.reason.confirm.limit": "You're exceeding your limit for this action ({0} > {1}). Use //confirm to execute {2}", - "fawe.cancel.reason": "Your WorldEdit action was cancelled: {0}.", - "fawe.cancel.reason.manual": "Manual cancellation", - "fawe.cancel.reason.low.memory": "Low memory", - "fawe.cancel.reason.max.changes": "Too many blocks changed", - "fawe.cancel.reason.max.checks": "Too many block checks", - "fawe.cancel.reason.max.tiles": "Too many block entities", - "fawe.cancel.reason.max.entities": "Too many entities", - "fawe.cancel.reason.max.iterations": "Max iterations", - "fawe.cancel.reason.outside.level": "Outside world", - "fawe.cancel.reason.outside.region": "Outside allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", - "fawe.cancel.reason.no.region": "No allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", - "fawe.cancel.reason.no.region.reason": "No allowed region: {0}", - "fawe.cancel.reason.no.region.plot.noworldeditflag": "Plot flag NoWorldeditFlag set", - "fawe.cancel.reason.no.region.plot.owner.offline": "Region owner offline", - "fawe.cancel.reason.no.region.plot.owner.only": "Only region owners may edit them", - "fawe.cancel.reason.no.region.not.added": "Not added to region", - "fawe.cancel.reason.player-only": "This operation requires a player, and cannot be executed from console, or without an actor.", - "fawe.cancel.reason.actor-required": "This operation requires an actor.", - "fawe.cancel.worldedit.failed.load.chunk": "Skipped loading chunk: {0};{1}. Try increasing chunk-wait.", - - "fawe.navigation.no.block": "No block in sight! (or too far)", - - "fawe.selection.sel.max": "{0} points maximum.", - "fawe.selection.sel.fuzzy": "Fuzzy selector: Left click to select all contingent blocks, right click to add. To select an air cavity, use //pos1.", - "fawe.selection.sel.fuzzy-instruction": "Select all connected blocks (magic wand)", - "fawe.selection.sel.convex.polyhedral": "Convex polyhedral selector: Left click=First vertex, right click to add more.", - "fawe.selection.sel.polyhedral": "Select a hollow polyhedral", - "fawe.selection.sel.list": "For a list of selection types use: //sel list", - - "fawe.tips.tip.sel.list": "Tip: See the different selection modes with //sel list", - "fawe.tips.tip.select.connected": "Tip: Select all connected blocks with //sel fuzzy", - "fawe.tips.tip.set.pos1": "Tip: Use pos1 as a pattern with //set pos1", - "fawe.tips.tip.farwand": "Tip: Select distant points with //farwand", - "fawe.tips.tip.discord": "Need help using FAWE? https://discord.gg/intellectualsites", - "fawe.tips.tip.lazycut": "Tip: It is safer to use //lazycut", - "fawe.tips.tip.fast": "Tip: Set fast and without undo using //fast", - "fawe.tips.tip.cancel": "Tip: You can //cancel an edit in progress", - "fawe.tips.tip.mask": "Tip: Set a global destination mask with /gmask", - "fawe.tips.tip.mask.angle": "Tip: Replace upward slopes of 3-20 blocks using //replace /[-20][-3] bedrock", - "fawe.tips.tip.set.linear": "Tip: Set blocks linearly with //set #l3d[wood,bedrock]", - "fawe.tips.tip.surface.spread": "Tip: Spread a flat surface with //set #surfacespread[5][0][5][#existing]", - "fawe.tips.tip.set.hand": "Tip: Use your current hand with //set hand", - "fawe.tips.tip.replace.regex": "Tip: Replace using regex: //replace .*_log ", - "fawe.tips.tip.replace.regex.2": "Tip: Replace using regex: //replace .*stairs[facing=(north|south)] ", - "fawe.tips.tip.replace.regex.3": "Tip: Replace using operators: //replace water[level>2] sand", - "fawe.tips.tip.replace.regex.4": "Tip: Replace using operators: //replace true *[waterlogged=false]", - "fawe.tips.tip.replace.regex.5": "Tip: Replace using operators: //replace true *[level-=1]", - "fawe.tips.tip.replace.id": "Tip: Replace only the block id: //replace woodenstair #id[cobblestair]", - "fawe.tips.tip.replace.light": "Tip: Remove light sources with //replace #brightness[1][15] 0", - "fawe.tips.tip.tab.complete": "Tip: The replace command supports tab completion", - "fawe.tips.tip.flip": "Tip: Mirror with //flip", - "fawe.tips.tip.deform": "Tip: Reshape with //deform", - "fawe.tips.tip.transform": "Tip: Set a transform with //gtransform", - "fawe.tips.tip.copypaste": "Tip: Paste on click with //br copypaste", - "fawe.tips.tip.source.mask": "Tip: Set a source mask with /gsmask ", - "fawe.tips.tip.replace.marker": "Tip: Replace a block with your full clipboard using //replace wool #fullcopy", - "fawe.tips.tip.paste": "Tip: Place with //paste", - "fawe.tips.tip.lazycopy": "Tip: lazycopy is faster", - "fawe.tips.tip.download": "Tip: Try out //download", - "fawe.tips.tip.rotate": "Tip: Orientate with //rotate", - "fawe.tips.tip.copy.pattern": "Tip: To use as a pattern try #copy", - "fawe.tips.tip.regen.0": "Tip: Use a biome with /regen [biome]", - "fawe.tips.tip.regen.1": "Tip: Use a seed with /regen [biome] [seed]", - "fawe.tips.tip.biome.pattern": "Tip: The #biome[forest] pattern can be used in any command", - "fawe.tips.tip.biome.mask": "Tip: Restrict to a biome with the `$jungle` mask", - - "fawe.regen.time": "Regenerating region, this might take a while!", - - "worldedit.expand.description.vert": "Vertically expand the selection to world limits.", - "worldedit.expand.expanded": "Region expanded {0} blocks", - "worldedit.expand.expanded.vert": "Region expanded {0} blocks (top-to-bottom).", - - "worldedit.biomeinfo.lineofsight": "Biomes at line of sight point: {0}", - "worldedit.biomeinfo.position": "Biomes at your position: {0}", - "worldedit.biomeinfo.selection": "Biomes in your selection: {0}", - - "worldedit.error.disabled": "This functionality is disabled (see WorldEdit configuration).", - "worldedit.error.no-match": "No match for '{0}'.", - "worldedit.error.unknown": "Unknown error occurred: {0}", - "worldedit.error.parser.player-only": "Input '{0}' requires a player!", - "worldedit.error.parser.bad-state-format": "Bad state format in {0}", - "worldedit.error.parser.unknown-property": "Unknown property '{0}' for block '{1}'", - "worldedit.error.parser.duplicate-property": "Duplicate property: {0}", - "worldedit.error.parser.unknown-value": "Unknown value '{0}' for property '{1}'", - "worldedit.error.parser.invalid-colon": "Invalid colon.", - "worldedit.error.parser.hanging-lbracket": "Invalid format. Hanging bracket at '{0}'.", - "worldedit.error.parser.missing-rbracket": "State is missing trailing ']'", - "worldedit.error.incomplete-region": "Make a region selection first.", - "worldedit.error.not-a-block": "This item is not a block.", - "worldedit.error.unknown-entity": "Entity name '{0}' was not recognized.", - "worldedit.error.unknown-mob": "Mob name '{0}' was not recognized.", - "worldedit.error.parser.clipboard.missing-offset": "Offset specified with @ but no offset given. Use '#copy@[x,y,z]'.", - "worldedit.error.parser.clipboard.missing-coordinates": "Clipboard offset needs x,y,z coordinates.", - "worldedit.error.unknown-item": "Item name '{0}' was not recognized.", - "worldedit.error.parser.invalid-expression": "Invalid expression: {0}", - "worldedit.error.parser.negate-nothing": "Cannot negate nothing!", - "worldedit.error.invalid-page": "Invalid page number", - "worldedit.error.missing-extent": "No Extent is known", - "worldedit.error.missing-session": "No LocalSession is known", - "worldedit.error.missing-world": "You need to provide a world (Try //world)", - "worldedit.error.missing-actor": "No actor is known", - "worldedit.error.no-file-selected": "No file selected.", - "worldedit.error.file-resolution.outside-root": "Path is outside allowable root", - "worldedit.error.file-resolution.resolve-failed": "Failed to resolve path", - "worldedit.error.invalid-filename.invalid-characters": "Invalid characters or extension missing", - "worldedit.error.invalid-number.matches": "Number expected; string \"{0}\" given.", - "worldedit.error.invalid-number": "Number expected; string given.", - "worldedit.error.unknown-block": "Block name '{0}' was not recognized.", - "worldedit.error.disallowed-block": "Block '{0}' not allowed (see WorldEdit configuration).", - "worldedit.error.max-changes": "Max blocks changed in an operation reached ({0}).", - "worldedit.error.max-brush-radius": "Maximum brush radius (in config-legacy.yml): {0}", - "worldedit.error.max-radius": "Maximum radius (in config-legacy.yml): {0}", - "worldedit.error.unknown-direction": "Unknown direction: {0}", - "worldedit.error.empty-clipboard": "Your clipboard is empty. Use //copy first.", - "worldedit.error.invalid-filename": "Filename '{0}' invalid: {1}", - "worldedit.error.file-resolution": "File '{0}' resolution error: {1}", - "worldedit.tool.error.cannot-bind": "Can't bind tool to {0}: {1}", - "worldedit.error.file-aborted": "File selection aborted.", - "worldedit.error.world-unloaded": "The world was unloaded already.", - "worldedit.error.blocks-cant-be-used": "Blocks can't be used", - "worldedit.error.unknown-tag": "Tag name '{0}' was not recognized.", - "worldedit.error.empty-tag": "Tag name '{0}' has no contents.", - "worldedit.error.unknown-biome": "Biome name '{0}' was not recognized.", - - "worldedit.brush.radius-too-large": "Maximum allowed brush radius: {0}", - "worldedit.brush.apply.description": "Apply brush, apply a function to every block", - "worldedit.brush.apply.radius": "The size of the brush", - "worldedit.brush.apply.shape": "The shape of the region", - "worldedit.brush.apply.type": "Type of brush to use", - "worldedit.brush.apply.item.warning": "This brush simulates item usages. Its effects may not work on all platforms, may not be undo-able, and may cause strange interactions with other mods/plugins. Use at your own risk.", - "worldedit.brush.paint.description": "Paint brush, apply a function to a surface", - "worldedit.brush.paint.size": "The size of the brush", - "worldedit.brush.paint.shape": "The shape of the region", - "worldedit.brush.paint.density": "The density of the brush", - "worldedit.brush.paint.type": "Type of brush to use", - "worldedit.brush.paint.item.warning": "This brush simulates item usages. Its effects may not work on all platforms, may not be undo-able, and may cause strange interactions with other mods/plugins. Use at your own risk.", - "worldedit.brush.sphere.equip": "Sphere brush shape equipped ({0}).", - "worldedit.brush.cylinder.equip": "Cylinder brush shape equipped ({0} by {1}).", - "worldedit.brush.clipboard.equip": "Clipboard brush shape equipped.", - "worldedit.brush.smooth.equip": "Smooth brush equipped ({0} x {1}x using {2}).", - "worldedit.brush.smooth.nofilter": "any block", - "worldedit.brush.smooth.filter": "filter", - "worldedit.brush.snowsmooth.equip": "SnowSmooth brush equipped ({0} x {1}x using {2}), {3} snow blocks.", - "worldedit.brush.snowsmooth.nofilter": "any block", - "worldedit.brush.snowsmooth.filter": "filter", - "worldedit.brush.extinguish.equip": "Extinguisher equipped ({0}).", - "worldedit.brush.gravity.equip": "Gravity brush equipped ({0}).", - "worldedit.brush.butcher.equip": "Butcher brush equipped ({0}).", - "worldedit.brush.operation.equip": "Set brush to {0}.", - "worldedit.brush.none.equip": "Brush unbound from your current item.", - - "worldedit.setbiome.changed": "Biomes were changed in {0} columns. You may have to rejoin your game (or close and reopen your world) to see a change.", - - "worldedit.drawsel.disabled": "Server CUI disabled.", - "worldedit.drawsel.enabled": "Server CUI enabled. This only supports cuboid regions, with a maximum size of {0}x{1}x{2}.", - "worldedit.drawsel.disabled.already": "Server CUI already disabled.", - "worldedit.drawsel.enabled.already": "Server CUI already enabled.", - "worldedit.limit.too-high": "Your maximum allowable limit is {0}.", - "worldedit.limit.set": "Block change limit set to {0}.", - "worldedit.limit.return-to-default": "(Use //limit to go back to the default.)", - "worldedit.timeout.too-high": "Your maximum allowable timeout is {0}ms.", - "worldedit.timeout.set": "Timeout time set to {0}ms.", - "worldedit.timeout.return-to-default": " (Use //timeout to go back to the default.)", - "worldedit.fast.disabled": "Fast mode disabled.", - "worldedit.fast.enabled": "Fast mode enabled. Changes won't be written to history (//undo is disabled). Lighting in the affected chunks may be wrong and/or you may need to rejoin to see changes.", - "worldedit.fast.disabled.already": "Fast mode already disabled.", - "worldedit.fast.enabled.already": "Fast mode already enabled.", - "worldedit.perf.sideeffect.set": "Side effect \"{0}\" set to {1}", - "worldedit.perf.sideeffect.get": "Side effect \"{0}\" is set to {1}", - "worldedit.perf.sideeffect.already-set": "Side effect \"{0}\" is already {1}", - "worldedit.perf.sideeffect.set-all": "All side effects set to {0}", - "worldedit.reorder.current": "The reorder mode is {0}", - "worldedit.reorder.set": "The reorder mode is now {0}", - "worldedit.gmask.disabled": "Global mask disabled.", - "worldedit.gmask.set": "Global mask set.", - "worldedit.toggleplace.pos1": "Now placing at pos #1.", - "worldedit.toggleplace.player": "Now placing at the block you stand in.", - "worldedit.toggleplace.not-locatable": "Cannot toggle placing in this context.", - "worldedit.searchitem.too-short": "Enter a longer search string (len > 2).", - "worldedit.searchitem.either-b-or-i": "You cannot use both the 'b' and 'i' flags simultaneously.", - "worldedit.searchitem.searching": "(Please wait... searching items.)", - "worldedit.watchdog.no-hook": "This platform has no watchdog hook.", - "worldedit.watchdog.active.already": "Watchdog hook already active.", - "worldedit.watchdog.inactive.already": "Watchdog hook already inactive.", - "worldedit.watchdog.active": "Watchdog hook now active.", - "worldedit.watchdog.inactive": "Watchdog hook now inactive.", - "worldedit.world.remove": "Removed world override.", - "worldedit.world.set": "Set the world override to {0}. (Use //world to go back to default)", - - "worldedit.undo.undone": "Undid {0} available edits.", - "worldedit.undo.none": "Nothing left to undo.", - "worldedit.redo.redone": "Redid {0} available edits.", - "worldedit.redo.none": "Nothing left to redo.", - "worldedit.clearhistory.cleared": "History cleared.", - - "worldedit.raytrace.noblock": "No block in sight!", - - "worldedit.restore.not-configured": "Snapshot/backup restore is not configured.", - "worldedit.restore.not-available": "That snapshot does not exist or is not available.", - "worldedit.restore.failed": "Failed to load snapshot: {0}", - "worldedit.restore.loaded": "Snapshot '{0}' loaded; now restoring...", - "worldedit.restore.restored": "Restored; {0} missing chunks and {1} other errors.", - "worldedit.restore.none-for-specific-world": "No snapshots were found for world '{0}'.", - "worldedit.restore.none-for-world": "No snapshots were found for this world.", - "worldedit.restore.none-found": "No snapshots were found.", - "worldedit.restore.none-found-console": "No snapshots were found. See console for details.", - "worldedit.restore.chunk-not-present": "Chunks were not present in snapshot.", - "worldedit.restore.chunk-load-failed": "No chunks could be loaded. (Bad archive?)", - "worldedit.restore.block-place-failed": "Errors prevented any blocks from being restored.", - "worldedit.restore.block-place-error": "Last error: {0}", - - "worldedit.snapshot.use.newest": "Now using newest snapshot.", - "worldedit.snapshot.use": "Snapshot set to: {0}", - "worldedit.snapshot.none-before": "Couldn't find a snapshot before {0}.", - "worldedit.snapshot.none-after": "Couldn't find a snapshot after {0}.", - "worldedit.snapshot.index-above-0": "Invalid index, must be greater than or equal to 1.", - "worldedit.snapshot.index-oob": "Invalid index, must be between 1 and {0}.", - - "worldedit.schematic.unknown-format": "Unknown schematic format: {0}.", - "worldedit.schematic.load.does-not-exist": "Schematic {0} does not exist!", - "worldedit.schematic.load.loading": "(Please wait... loading schematic.)", - "worldedit.schematic.save.already-exists": "That schematic already exists. Use the -f flag to overwrite it.", - "worldedit.schematic.save.failed-directory": "Could not create folder for schematics!", - "worldedit.schematic.save.saving": "(Please wait... saving schematic.)", - "worldedit.schematic.delete.empty": "Schematic {0} not found!", - "worldedit.schematic.delete.does-not-exist": "Schematic {0} does not exist!", - "worldedit.schematic.delete.failed": "Deletion of {0} failed! Is it read-only?", - "worldedit.schematic.delete.deleted": "{0} has been deleted.", - "worldedit.schematic.formats.title": "Available clipboard formats (Name: Lookup names)", - "worldedit.schematic.load.symbol": "[L]", - "worldedit.schematic.plus.symbol": "[+]", - "worldedit.schematic.minus.symbol": "[-]", - "worldedit.schematic.x.symbol": "[X]", - "worldedit.schematic.0.symbol": "[O]", - "worldedit.schematic.dash.symbol": " - ", - "worldedit.schematic.click-to-load": "Click to load", - "worldedit.schematic.load": "Load", - "worldedit.schematic.list": "List", - "worldedit.schematic.available": "Available schematics", - "worldedit.schematic.unload": "Unload", - "worldedit.schematic.delete": "delete", - "worldedit.schematic.visualize": "visualize", - "worldedit.schematic.clipboard": "Add to (multi-)clipboard", - "worldedit.schematic.unknown-filename": "Unknown filename: {0}", - "worldedit.schematic.file-not-exist": "File could not be read or it does not exist: {0}", - "worldedit.schematic.already-exists": "That schematic already exists!", - "worldedit.schematic.failed-to-save": "Failed to save schematic", - "worldedit.schematic.directory-does-not-exist": "Directory '{0}' does not exist!", - "worldedit.schematic.file-perm-fail": "Creation of '{0}' failed! Check file permission.", - "worldedit.schematic.sorting-old-new": "Cannot sort by oldest and newest.", - "worldedit.schematic.unsupported-minecraft-version": "This version of WorldEdit does not support your Minecraft version. Schematics will not work until this is resolved.", - - "worldedit.pos.already-set": "Position already set.", - "worldedit.pos.console-require-coords": "You must provide coordinates as console.", - "worldedit.hpos.no-block": "No block in sight!", - "worldedit.hpos.already-set": "Position already set.", - "worldedit.chunk.selected-multiple": "Chunks selected: ({0}, {1}, {2}) - ({3}, {4}, {5})", - "worldedit.chunk.selected": "Chunk selected: {0}, {1}, {2}", - "worldedit.wand.invalid": "Wand item is mis-configured or disabled.", - "worldedit.wand.selwand.info": "Left click: select pos #1; Right click: select pos #2", - "worldedit.wand.selwand.now.tool": "The selection wand is now a normal tool. You can disable it with {0} and rebind it to any item with {1} or get a new wand with {2}.", - "worldedit.wand.navwand.info": "Left click: jump to location; Right click: pass through walls", - "worldedit.contract.contracted": "Region contracted {0} blocks.", - "worldedit.shift.shifted": "Region shifted.", - "worldedit.outset.outset": "Region outset.", - "worldedit.inset.inset": "Region inset.", - "worldedit.size.offset": "{0}: {1} @ {2} ({3} blocks)", - "worldedit.size.type": "Type: {0}", - "worldedit.size.size": "Size: {0}", - "worldedit.size.distance": "Cuboid distance: {0}", - "worldedit.size.blocks": "# of blocks: {0}", - "worldedit.count.counted": "Counted: {0}", - "worldedit.distr.no-blocks": "No blocks counted.", - "worldedit.distr.no-previous": "No previous distribution.", - "worldedit.distr.total": "Total Block Count: {0}", - "worldedit.select.cleared": "Selection cleared.", - "worldedit.select.cuboid.message": "Cuboid: left click for point 1, right click for point 2", - "worldedit.select.cuboid.description": "Select two corners of a cuboid", - "worldedit.select.extend.message": "Cuboid: left click for a starting point, right click to extend", - "worldedit.select.extend.description": "Fast cuboid selection mode", - "worldedit.select.poly.message": "2D polygon selector: Left/right click to add a point.", - "worldedit.select.poly.limit-message": "{0} points maximum.", - "worldedit.select.poly.description": "Select a 2D polygon with height", - "worldedit.select.ellipsoid.message": "Ellipsoid selector: left click=center, right click to extend", - "worldedit.select.ellipsoid.description": "Select an ellipsoid", - "worldedit.select.sphere.message": "Sphere selector: left click=center, right click to set radius", - "worldedit.select.sphere.description": "Select a sphere", - "worldedit.select.cyl.message": "Cylindrical selector: Left click=center, right click to extend", - "worldedit.select.cyl.description": "Select a cylinder", - "worldedit.select.convex.message": "Convex polyhedral selector: Left click=First vertex, right click to add more.", - "worldedit.select.convex.limit-message": "{0} points maximum.", - "worldedit.select.convex.description": "Select a convex polyhedral", - "worldedit.select.default-set": "Your default region selector is now {0}.", - - "worldedit.chunkinfo.chunk": "Chunk: {0}, {1}", - "worldedit.chunkinfo.old-filename": "Old format: {0}", - "worldedit.chunkinfo.mcregion-filename": "McRegion: region/{0}", - "worldedit.listchunks.listfor": "Listing chunks for: {0}", - - "worldedit.drain.drained": "{0} blocks have been drained.", - "worldedit.fill.created": "{0} blocks have been filled.", - "worldedit.fillr.created": "{0} blocks have been filled.", - "worldedit.fixlava.fixed": "{0} blocks have been fixed.", - "worldedit.fixwater.fixed": "{0} blocks have been fixed.", - "worldedit.removeabove.removed": "{0} blocks have been removed.", - "worldedit.removebelow.removed": "{0} blocks have been removed.", - "worldedit.removenear.removed": "{0} blocks have been removed.", - "worldedit.replacenear.replaced": "{0} blocks have been replaced.", - "worldedit.snow.created": "{0} surfaces have been covered.", - "worldedit.thaw.removed": "{0} blocks have been thawed.", - "worldedit.green.changed": "{0} blocks have been greened.", - "worldedit.extinguish.removed": "{0} fires have been extinguished.", - "worldedit.butcher.killed": "{0} mobs have been killed in a radius of {1}.", - "worldedit.butcher.explain-all": "Use -1 to remove all mobs in loaded chunks", - "worldedit.remove.removed": "{0} entities have been marked for removal.", - "worldedit.remove.explain-all": "Use -1 to remove all entities in loaded chunks", - "worldedit.calc.invalid": "'{0}' could not be parsed as a valid expression", - "worldedit.calc.invalid.with-error": "'{0}' could not be parsed as a valid expression: '{1}'", - - "worldedit.paste.pasted": "The clipboard has been pasted at {0}", - "worldedit.paste.selected": "Selected clipboard paste region.", - "worldedit.rotate.no-interpolation": "Note: Interpolation is not yet supported, so angles that are multiples of 90 is recommended.", - "worldedit.rotate.rotated": "The clipboard copy has been rotated.", - "worldedit.flip.flipped": "The clipboard copy has been flipped.", - "worldedit.clearclipboard.cleared": "Clipboard cleared.", - - "worldedit.set.done": "Operation completed.", - "worldedit.set.done.verbose": "Operation completed ({0}).", - "worldedit.line.changed": "{0} blocks have been changed.", - "worldedit.line.invalid-type": "//line only works with cuboid selections or convex polyhedral selections", - "worldedit.line.cuboid-only": "//line only works with cuboid selections", - "worldedit.curve.changed": "{0} blocks have been changed.", - "worldedit.curve.invalid-type": "//curve only works with convex polyhedral selections", - "worldedit.curve.convex-only": "//curve only works with convex polyhedral selections", - "worldedit.replace.replaced": "{0} blocks have been replaced.", - "worldedit.stack.changed": "{0} blocks changed. Undo with //undo", - "worldedit.regen.regenerated": "Region regenerated.", - "worldedit.regen.failed": "Unable to regenerate chunks. Check console for details.", - "worldedit.walls.changed": "{0} blocks have been changed.", - "worldedit.faces.changed": "{0} blocks have been changed.", - "worldedit.overlay.overlaid": "{0} blocks have been overlaid.", - "worldedit.naturalize.naturalized": "{0} block(s) have been made to look more natural.", - "worldedit.center.changed": "Center set. ({0} blocks changed)", - "worldedit.smooth.changed": "Terrain's height map smoothed. {0} blocks changed.", - "worldedit.snowsmooth.changed": "Snow's height map smoothed. {0} blocks changed.", - "worldedit.move.moved": "{0} blocks moved.", - "worldedit.deform.deformed": "{0} blocks have been deformed.", - "worldedit.hollow.changed": "{0} blocks have been changed.", - "worldedit.forest.created": "{0} trees created.", - "worldedit.flora.created": "{0} flora created.", - - "worldedit.unstuck.moved": "There you go!", - "worldedit.ascend.obstructed": "No free spot above you found.", - "worldedit.ascend.moved": "Ascended {0} levels.", - "worldedit.descend.obstructed": "No free spot below you found.", - "worldedit.descend.moved": "Descended {0} levels.", - "worldedit.ceil.obstructed": "No free spot above you found.", - "worldedit.ceil.moved": "Woosh!", - "worldedit.thru.obstructed": "No free spot ahead of you found.", - "worldedit.thru.moved": "Woosh!", - "worldedit.jumpto.moved": "Poof!", - "worldedit.jumpto.none": "No block in sight (or too far away)!", - "worldedit.up.obstructed": "You would hit something above you.", - "worldedit.up.moved": "Woosh!", - - "worldedit.cyl.invalid-radius": "You must either specify 1 or 2 radius values.", - "worldedit.cyl.created": "{0} blocks have been created.", - "worldedit.hcyl.thickness-too-large": "Thickness cannot be larger than x or z radii.", - "worldedit.sphere.invalid-radius": "You must either specify 1 or 3 radius values.", - "worldedit.sphere.created": "{0} blocks have been created.", - "worldedit.forestgen.created": "{0} trees created.", - "worldedit.pumpkins.created": "{0} pumpkin patches created.", - "worldedit.pyramid.created": "{0} blocks have been created.", - "worldedit.generate.created": "{0} blocks have been created.", - "worldedit.generatebiome.changed": "{0} biomes affected.", - - "worldedit.reload.config": "Configuration reloaded!", - "worldedit.report.written": "FAWE report written to {0}", - "worldedit.report.error": "Failed to write report: {0}", - "worldedit.report.callback": "FAWE report: {0}.report", - "worldedit.timezone.invalid": "Invalid timezone", - "worldedit.timezone.set": "Timezone set for this session to: {0}", - "worldedit.timezone.current": "The current time in that timezone is: {0}", - "worldedit.version.version": "FAWE version:\n - Date {0}\n - Commit {1}\n - Build {2}\n - Platform {3}", - "worldedit.version.bukkit.unsupported-adapter": "This FAWE version does not fully support your version of Bukkit. Block entities (e.g. chests) will be empty, block properties (e.g. rotation) will be missing, and other things may not work.\nUpdate FAWE and your server software to restore this functionality:\n{0}", - - "worldedit.trace.no-tracing-extents": "Trace: No extent was used.", - "worldedit.trace.action-failed": "Trace: Action(s) {0} at {1} discarded by extent {2}", - "worldedit.trace.active.already": "Trace mode already active.", - "worldedit.trace.inactive.already": "Trace mode already inactive.", - "worldedit.trace.active": "Trace mode now active.", - "worldedit.trace.inactive": "Trace mode now inactive.", - - "worldedit.command.time-elapsed": "{0}s elapsed (history: {1} changed; {2} blocks/sec).", - "worldedit.command.permissions": "You are not permitted to do that. Are you in the right mode?", - "worldedit.command.player-only": "This command must be used with a player.", - "worldedit.command.error.report": "&cPlease report this error: [See console]", - "worldedit.command.deprecation": "This command is deprecated.", - "worldedit.command.deprecation-message": "Please use '{0}' instead.", - "worldedit.pastebin.uploading": "(Please wait... sending output to paste service...)", - "worldedit.session.cant-find-session": "Unable to find session for {0}", - "worldedit.platform.no-file-dialog": "File dialogs are not supported in your environment.", - - "worldedit.tool.max-block-changes": "Max blocks change limit reached.", - "worldedit.tool.no-block": "No block in sight!", - "worldedit.tool.repl.equip": "Block replacer tool bound to {0}.", - "worldedit.tool.repl.switched": "Replacer tool switched to: {0}", - "worldedit.tool.data-cycler.equip": "Block data cycler tool bound to {0}.", - "worldedit.tool.data-cycler.block-not-permitted": "You are not permitted to cycle the data value of that block.", - "worldedit.tool.data-cycler.cant-cycle": "That block's data cannot be cycled!", - "worldedit.tool.data-cycler.new-value": "Value of {0} is now {1}.", - "worldedit.tool.data-cycler.cycling": "Now cycling {0}.", - "worldedit.tool.deltree.equip": "Floating tree remover tool bound to {0}.", - "worldedit.tool.deltree.not-tree": "That's not a tree.", - "worldedit.tool.deltree.not-floating": "That's not a floating tree.", - "worldedit.tool.tree.equip": "Tree tool bound to {0}.", - "worldedit.tool.tree.obstructed": "A tree can't go there.", - "worldedit.tool.info.equip": "Info tool bound to {0}.", - "worldedit.tool.inspect.equip": "Inspect tool bound to {0}.", - "worldedit.tool.info.blockstate.hover": "Block state", - "worldedit.tool.info.internalid.hover": "Internal ID", - "worldedit.tool.info.legacy.hover": "Legacy id:data", - "worldedit.tool.info.light.hover": "Block Light/Light Above", - "worldedit.tool.none.equip": "Tool unbound from your current item.", - "worldedit.tool.selwand.equip": "Selection wand bound to {0}.", - "worldedit.tool.navwand.equip": "Navigation wand bound to {0}.", - "worldedit.tool.floodfill.equip": "Block flood fill tool bound to {0}.", - "worldedit.tool.farwand.equip": "Far wand tool bound to {0}.", - "worldedit.tool.lrbuild.equip": "Long-range building tool bound to {0}.", - "worldedit.tool.lrbuild.set": "Left-click set to {0}; right-click set to {1}.", - "worldedit.tool.stack.equip": "Stack tool bound to {0}.", - - "worldedit.tool.unbind-instruction": "Run {0} while holding the item to unbind it.", - - "worldedit.tool.superpickaxe.mode.single": "Mode is now single. Left click with a pickaxe. // to disable.", - "worldedit.tool.superpickaxe.mode.area": "Mode is now area. Left click with a pickaxe. // to disable.", - "worldedit.tool.superpickaxe.mode.recursive": "Mode is now recursive. Left click with a pickaxe. // to disable.", - "worldedit.tool.superpickaxe.max-range": "Maximum range is {0}.", - "worldedit.tool.superpickaxe.enabled.already": "Super pickaxe already enabled.", - "worldedit.tool.superpickaxe.disabled.already": "Super pickaxe already disabled.", - "worldedit.tool.superpickaxe.enabled": "Super pickaxe enabled.", - "worldedit.tool.superpickaxe.disabled": "Super pickaxe disabled.", - "worldedit.tool.mask.set": "Brush mask set.", - "worldedit.tool.mask.disabled": "Brush mask disabled.", - "worldedit.tool.material.set": "Brush material set.", - "worldedit.tool.range.set": "Brush range set.", - "worldedit.tool.size.set": "Brush size set.", - "worldedit.tool.tracemask.set": "Trace mask set.", - "worldedit.tool.tracemask.disabled": "Trace mask disabled.", - - "worldedit.execute.script-permissions": "You don't have permission to use that script.", - "worldedit.executelast.no-script": "Use /cs with a script name first.", - "worldedit.script.read-error": "Script read error: {0}", - "worldedit.script.unsupported": "Only .js scripts are currently supported", - "worldedit.script.file-not-found": "Script does not exist: {0}", - "worldedit.script.no-script-engine": "Failed to find an installed script engine.\nPlease see https://worldedit.enginehub.org/en/latest/usage/other/craftscripts/", - "worldedit.script.failed": "Failed to execute: {0}", - "worldedit.script.failed-console": "Failed to execute (see console): {0}", - - "worldedit.operation.affected.biome": "{0} biomes affected", - "worldedit.operation.affected.block": "{0} blocks affected", - "worldedit.operation.affected.column": "{0} columns affected", - "worldedit.operation.affected.entity": "{0} entities affected", - "worldedit.operation.deform.expression": "deformed using {0}", - - "worldedit.error.parser.invalid-nbt": "Invalid NBT Data in input: '{0}'. Error: {1}", - - "worldedit.selection.convex.info.vertices": "Vertices: {0}", - "worldedit.selection.convex.info.triangles": "Triangles: {0}", - "worldedit.selection.convex.explain.primary": "Started new selection with vertex {0}.", - "worldedit.selection.convex.explain.secondary": "Added vertex {0} to the selection.", - "worldedit.selection.cuboid.info.pos1": "Position 1: {0}", - "worldedit.selection.cuboid.info.pos2": "Position 2: {0}", - "worldedit.selection.cuboid.explain.primary": "First position set to {0}.", - "worldedit.selection.cuboid.explain.primary-area": "First position set to {0} ({1}).", - "worldedit.selection.cuboid.explain.secondary": "Second position set to {0}.", - "worldedit.selection.cuboid.explain.secondary-area": "Second position set to {0} ({1}).", - "worldedit.selection.extend.explain.primary": "Started selection at {0} ({1}).", - "worldedit.selection.extend.explain.secondary": "Extended selection to encompass {0} ({1}).", - "worldedit.selection.ellipsoid.info.center": "Center: {0}", - "worldedit.selection.ellipsoid.info.radius": "X/Y/Z Radius: {0}", - "worldedit.selection.ellipsoid.explain.primary": "Center position set to {0}.", - "worldedit.selection.ellipsoid.explain.primary-area": "Center position set to {0} ({1}).", - "worldedit.selection.ellipsoid.explain.secondary": "Radius set to {0}.", - "worldedit.selection.ellipsoid.explain.secondary-area": "Radius set to {0} ({1}).", - "worldedit.selection.cylinder.info.center": "Center: {0}", - "worldedit.selection.cylinder.info.radius": "Radius: {0}", - "worldedit.selection.cylinder.explain.primary": "Starting a new cylindrical selection at {0}.", - "worldedit.selection.cylinder.explain.secondary": "Radius set to {0}/{1} blocks. ({2})", - "worldedit.selection.cylinder.explain.secondary-missing": "You must select the center point before setting the radius.", - "worldedit.selection.polygon2d.info": "# points: {0}", - "worldedit.selection.polygon2d.explain.primary": "Starting a new polygon at {0}.", - "worldedit.selection.polygon2d.explain.secondary": "Added point #{0} at {1}.", - "worldedit.selection.sphere.explain.secondary": "Radius set to {0}.", - "worldedit.selection.sphere.explain.secondary-defined": "Radius set to {0} ({1}).", - - "worldedit.sideeffect.lighting": "Lighting", - "worldedit.sideeffect.lighting.description": "Updates block lighting", - "worldedit.sideeffect.neighbors": "Neighbors", - "worldedit.sideeffect.neighbors.description": "Notifies nearby blocks of changes", - "worldedit.sideeffect.update": "Update", - "worldedit.sideeffect.update.description": "Notifies the changed block", - "worldedit.sideeffect.validation": "Validation", - "worldedit.sideeffect.validation.description": "Validates and fixes inconsistent world state, such as disconnected blocks", - "worldedit.sideeffect.entity_ai": "Entity AI", - "worldedit.sideeffect.entity_ai.description": "Updates Entity AI paths for the block changes", - "worldedit.sideeffect.events": "Mod/Plugin Events", - "worldedit.sideeffect.events.description": "Tells other mods/plugins about these changes when applicable", - "worldedit.sideeffect.state.on": "On", - "worldedit.sideeffect.state.delayed": "Delayed", - "worldedit.sideeffect.state.off": "Off", - "worldedit.sideeffect.box.current": "Current", - "worldedit.sideeffect.box.change-to": "Click to set to {0}", - - "worldedit.help.command-not-found": "The command '{0}' could not be found.", - "worldedit.help.no-subcommands": "'{0}' has no sub-commands. (Maybe '{1}' is for a parameter?)", - "worldedit.help.subcommand-not-found": "The sub-command '{0}' under '{1}' could not be found.", - - "worldedit.cli.stopping": "Stopping!", - "worldedit.cli.unknown-command": "Unknown command!" + "prefix": "&8(&4&lFAWE&8)&7 {0}", + "fawe.worldedit.history.find.element": "&2{0} {1} &7ago &3{2}m &6{3} &c/{4}", + "fawe.worldedit.history.find.element.more": " - Changes: {0}\n - Bounds: {1} -> {2}\n - Extra: {3}\n - Size on Disk: {4}", + "fawe.worldedit.history.find.hover": "{0} blocks changed, click for more info", + "fawe.worldedit.history.distr.summary_null": "Could not find edit summary for inputs.", + "fawe.info.lighting.propagate.selection": "Lighting has been propagated in {0} chunks. (Note: To remove light use //removelight)", + "fawe.info.updated.lighting.selection": "Lighting has been updated in {0} chunks. (It may take a second for the packets to send)", + "fawe.info.set.region": "Selection set to your current allowed region", + "fawe.info.worldedit.toggle.tips.on": "Disabled FAWE tips.", + "fawe.info.worldedit.toggle.tips.off": "Enabled FAWE tips.", + "fawe.info.worldedit.bypassed": "Currently bypassing FAWE restriction.", + "fawe.info.worldedit.restricted": "Your FAWE edits are now restricted.", + "fawe.info.worldedit.oom.admin": "Possible options:\n - //fast\n - Do smaller edits\n - Allocate more memory\n - Disable `max-memory-percent`", + "fawe.info.temporarily-not-working": "Temporarily not working", + "fawe.info.update-available": "An update for FastAsyncWorldEdit is available. You are {0} build(s) out of date.\nYou are running version {1}, the latest version is {2}.\nUpdate at {3}", + "fawe.web.generating.link": "Uploading {0}, please wait...", + "fawe.web.generating.link.failed": "Failed to generate download link!", + "fawe.web.download.link": "{0}", + "fawe.worldedit.general.texture.disabled": "Texturing reset", + "fawe.worldedit.general.texture.set": "Set texturing to {1}", + "fawe.worldedit.general.source.mask.disabled": "Global source mask disabled", + "fawe.worldedit.general.source.mask": "Global source mask set", + "fawe.worldedit.general.transform.disabled": "Global transform disabled", + "fawe.worldedit.general.transform": "Global transform set", + "fawe.worldedit.copy.command.copy": "{0} blocks were copied.", + "fawe.worldedit.cut.command.cut.lazy": "{0} blocks will be removed on paste", + "fawe.worldedit.paste.command.paste": "The clipboard has been pasted at {0}", + "fawe.worldedit.history.command.undo.disabled": "Undo disabled, use: //fast", + "fawe.worldedit.selection.selection.count": "Counted {0} blocks.", + "fawe.worldedit.anvil.world.is.loaded": "The world shouldn't be in use when executing. Unload the world, or use -f to override (save first)", + "fawe.worldedit.brush.brush.reset": "Reset your brush. (SHIFT + Click)", + "fawe.worldedit.brush.brush.none": "You aren't holding a brush!", + "fawe.worldedit.brush.brush.scroll.action.set": "Set scroll action to {0}", + "fawe.worldedit.brush.brush.scroll.action.unset": "Removed scroll action", + "fawe.worldedit.brush.brush.visual.mode.set": "Set visual mode to {0}", + "fawe.worldedit.brush.brush.target.mode.set": "Set target mode to {0}", + "fawe.worldedit.brush.brush.target.offset.set": "Set target offset to {0}", + "fawe.worldedit.brush.brush.equipped": "Equipped brush {0}", + "fawe.worldedit.brush.brush.try.other": "There are other more suitable brushes e.g.,\n - //br height [radius=5] [#clipboard|file=null] [rotation=0] [yscale=1.00]", + "fawe.worldedit.brush.brush.copy": "Left click the base of an object to copy, right click to paste. Increase the brush radius if necessary.", + "fawe.worldedit.brush.brush.height.invalid": "Invalid height map file ({0})", + "fawe.worldedit.brush.brush.spline": "Click to add a point, click the same spot to finish", + "fawe.worldedit.brush.brush.line.primary": "Added point {0}, click another position to create the line", + "fawe.worldedit.brush.brush.catenary.direction": "Added point {0}, click the direction you want to create the spline", + "fawe.worldedit.brush.brush.line.secondary": "Created spline", + "fawe.worldedit.brush.spline.primary.2": "Added position, Click the same spot to join!", + "fawe.worldedit.brush.brush.spline.secondary.error": "Not enough positions set!", + "fawe.worldedit.brush.spline.secondary": "Created spline", + "fawe.worldedit.brush.brush.source.mask.disabled": "Brush source mask disabled", + "fawe.worldedit.brush.brush.source.mask": "Brush source mask set", + "fawe.worldedit.brush.brush.transform.disabled": "Brush transform disabled", + "fawe.worldedit.brush.brush.transform": "Brush transform set", + "fawe.worldedit.rollback.rollback.element": "Undoing {0}", + "fawe.worldedit.tool.tool.inspect": "Inspect tool bound to {0}.", + "fawe.worldedit.tool.tool.inspect.info": "{0} changed {1} to {2} {3} ago", + "fawe.worldedit.tool.tool.inspect.info.footer": "Total: {0} changes", + "fawe.worldedit.tool.tool.range.error": "Maximum range: {0}.", + "fawe.worldedit.tool.tool.lrbuild.info": "Left-click set to {0}; right-click set to {1}.", + "fawe.worldedit.utility.nothing.confirmed": "You have no actions pending confirmation.", + "fawe.worldedit.schematic.schematic.move.exists": "{0} already exists", + "fawe.worldedit.schematic.schematic.move.success": "{0} -> {1}", + "fawe.worldedit.schematic.schematic.move.failed": "{0} no moved: {1}", + "fawe.worldedit.schematic.schematic.loaded": "{0} loaded. Paste it with //paste", + "fawe.worldedit.schematic.schematic.saved": "{0} saved.", + "fawe.worldedit.schematic.schematic.none": "No files found.", + "fawe.worldedit.clipboard.clipboard.uri.not.found": "You do not have {0} loaded", + "fawe.worldedit.clipboard.clipboard.cleared": "Clipboard cleared", + "fawe.worldedit.clipboard.clipboard.invalid.format": "Unknown clipboard format: {0}", + "fawe.worldedit.visitor.visitor.block": "{0} blocks affected", + "fawe.worldedit.selector.selector.fuzzy.pos1": "Region set and expanded from {0} {1}.", + "fawe.worldedit.selector.selector.fuzzy.pos2": "Added expansion of {0} {1}.", + "fawe.progress.progress.message": "{1}/{0} ({2}%) @{3}cps {4}s left", + "fawe.progress.progress.finished": "[ Done! ]", + "fawe.error.command.syntax": "Usage: {0}", + "fawe.error.no-perm": "You are lacking the permission node: {0}", + "fawe.error.block.not.allowed": "You are not allowed to use: {0}", + "fawe.error.setting.disable": "Lacking setting: {0}", + "fawe.error.brush.not.found": "Available brushes: {0}", + "fawe.error.brush.incompatible": "Brush not compatible with this version", + "fawe.error.no.region": "You have no current allowed region", + "fawe.error.player.not.found": "Player not found: {0}", + "fawe.error.worldedit.some.fails": "{0} blocks weren't placed because they were outside your allowed region.", + "fawe.error.worldedit.some.fails.blockbag": "Missing blocks: {0}", + "fawe.error.mask.angle": "Cannot combine degree with block-step", + "fawe.error.invalid-flag": "The flag {0} is not applicable here", + "fawe.error.lighting": "Error when attempting lighting. You may need to reload the chunks to see the edit.", + "fawe.error.parser.invalid-data": "Invalid data: {0}", + "fawe.error.unsupported": "Unsupported!", + "fawe.error.invalid-block-type": "Does not match a valid block type: {0}", + "fawe.error.nbt.forbidden": "You are not allowed to use nbt. Lacking permission: {0}", + "fawe.error.invalid-arguments": "Invalid amount of arguments. Expected: {0}", + "fawe.error.unrecognised-tag": "Unrecognised tag: {0} {1}", + "fawe.error.unknown-block-tag": "Unknown block tag: {0}", + "fawe.error.block-tag-no-blocks": "Block tag '{0}' had no blocks.", + "fawe.error.no-block-found": "No block found for '{0}'.", + "fawe.error.invalid-states": "Invalid states: {0}", + "fawe.error.no-session": "No session is available, so no clipboard is available.", + "fawe.error.empty-clipboard": "To use '{0}', please first copy something to your clipboard", + "fawe.error.selection-expand": "Selection cannot expand.", + "fawe.error.selection-contract": "Selection cannot expand.", + "fawe.error.selection-shift": "Selection cannot be shifted.", + "fawe.error.invalid-user": "User must be provided.", + "fawe.error.radius-too-small": "Radius must be >=0", + "fawe.error.time-too-less": "Time must be >=0", + "fawe.error.invalid-image": "Invalid image: {0}", + "fawe.error.file-not-found": "File not found: {0}", + "fawe.error.file-is-invalid-directory": "File is a directory: {0}", + "fawe.error.stacktrace": "===============---=============", + "fawe.error.no-failure": "This shouldn't result in any failure", + "fawe.error.invalid-bracketing": "Invalid bracketing, are you missing a '{0}'.", + "fawe.error.too-simple": "Complexity must be in the range 0-100", + "fawe.error.outside-range": "Argument {0} outside of range {1}-{2}.", + "fawe.error.outside-range-lower": "Argument {0} may not be less than {1}", + "fawe.error.outside-range-upper": "Argument {0} may not be greater than {1}", + "fawe.error.argument-size-mismatch": "Argument {0} may not be greater than argument {1}", + "fawe.error.input-parser-exception": "Invalid empty string instead of boolean.", + "fawe.error.invalid-boolean": "Invalid boolean {0}", + "fawe.error.schematic.not.found": "Schematic {0} not found.", + "fawe.error.parse.invalid-dangling-character": "Invalid dangling character {0}.", + "fawe.error.parse.unknown-mask": "Unknown mask: {0}, See: {1}", + "fawe.error.parse.unknown-pattern": "Unknown pattern: {0}, See: {1}", + "fawe.error.parse.unknown-transform": "Unknown transform: {0}, See: {1}", + "fawe.error.parse.no-clipboard": "To use {0}, please first copy something to your clipboard", + "fawe.error.parse.no-clipboard-source": "No clipboards found at given source: {0}", + "fawe.error.clipboard.invalid": "====== INVALID CLIPBOARD ======", + "fawe.error.clipboard.invalid.info": "File: {0} (len: {1})", + "fawe.error.clipboard.load.failure": "Could not load clipboard. Possible that the clipboard is still being written to from another server?!", + "fawe.error.clipboard.on.disk.version.mismatch": "Clipboard version mismatch. Please delete your clipboards folder and restart the server.", + "fawe.error.limit.disallowed-block": "Your limit disallows use of block '{0}'", + "fawe.error.limit.disallowed-property": "Your limit disallows use of property '{0}'", + "fawe.cancel.count": "Cancelled {0} edits.", + "fawe.cancel.reason.confirm": "Use //confirm to execute {0}", + "fawe.cancel.reason.confirm.region": "Your selection is large ({0} -> {1}, containing {3} blocks). Use //confirm to execute {2}", + "fawe.cancel.reason.confirm.radius": "Your radius is large ({0} > {1}). Use //confirm to execute {2}", + "fawe.cancel.reason.confirm.limit": "You're exceeding your limit for this action ({0} > {1}). Use //confirm to execute {2}", + "fawe.cancel.reason": "Your WorldEdit action was cancelled: {0}.", + "fawe.cancel.reason.manual": "Manual cancellation", + "fawe.cancel.reason.low.memory": "Low memory", + "fawe.cancel.reason.max.changes": "Too many blocks changed", + "fawe.cancel.reason.max.checks": "Too many block checks", + "fawe.cancel.reason.max.tiles": "Too many block entities", + "fawe.cancel.reason.max.entities": "Too many entities", + "fawe.cancel.reason.max.iterations": "Max iterations", + "fawe.cancel.reason.outside.level": "Outside world", + "fawe.cancel.reason.outside.region": "Outside allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", + "fawe.cancel.reason.no.region": "No allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", + "fawe.cancel.reason.no.region.reason": "No allowed region: {0}", + "fawe.cancel.reason.no.region.plot.noworldeditflag": "Plot flag NoWorldeditFlag set", + "fawe.cancel.reason.no.region.plot.owner.offline": "Region owner offline", + "fawe.cancel.reason.no.region.plot.owner.only": "Only region owners may edit them", + "fawe.cancel.reason.no.region.not.added": "Not added to region", + "fawe.cancel.reason.player-only": "This operation requires a player, and cannot be executed from console, or without an actor.", + "fawe.cancel.reason.actor-required": "This operation requires an actor.", + "fawe.cancel.worldedit.failed.load.chunk": "Skipped loading chunk: {0};{1}. Try increasing chunk-wait.", + "fawe.navigation.no.block": "No block in sight! (or too far)", + "fawe.selection.sel.max": "{0} points maximum.", + "fawe.selection.sel.fuzzy": "Fuzzy selector: Left click to select all contingent blocks, right click to add. To select an air cavity, use //pos1.", + "fawe.selection.sel.fuzzy-instruction": "Select all connected blocks (magic wand)", + "fawe.selection.sel.convex.polyhedral": "Convex polyhedral selector: Left click=First vertex, right click to add more.", + "fawe.selection.sel.polyhedral": "Select a hollow polyhedral", + "fawe.selection.sel.list": "For a list of selection types use: //sel list", + "fawe.tips.tip.sel.list": "Tip: See the different selection modes with //sel list", + "fawe.tips.tip.select.connected": "Tip: Select all connected blocks with //sel fuzzy", + "fawe.tips.tip.set.pos1": "Tip: Use pos1 as a pattern with //set pos1", + "fawe.tips.tip.farwand": "Tip: Select distant points with //farwand", + "fawe.tips.tip.discord": "Need help using FAWE? https://discord.gg/intellectualsites", + "fawe.tips.tip.lazycut": "Tip: It is safer to use //lazycut", + "fawe.tips.tip.fast": "Tip: Set fast and without undo using //fast", + "fawe.tips.tip.cancel": "Tip: You can //cancel an edit in progress", + "fawe.tips.tip.mask": "Tip: Set a global destination mask with /gmask", + "fawe.tips.tip.mask.angle": "Tip: Replace upward slopes of 3-20 blocks using //replace /[-20][-3] bedrock", + "fawe.tips.tip.set.linear": "Tip: Set blocks linearly with //set #l3d[wood,bedrock]", + "fawe.tips.tip.surface.spread": "Tip: Spread a flat surface with //set #surfacespread[5][0][5][#existing]", + "fawe.tips.tip.set.hand": "Tip: Use your current hand with //set hand", + "fawe.tips.tip.replace.regex": "Tip: Replace using regex: //replace .*_log ", + "fawe.tips.tip.replace.regex.2": "Tip: Replace using regex: //replace .*stairs[facing=(north|south)] ", + "fawe.tips.tip.replace.regex.3": "Tip: Replace using operators: //replace water[level>2] sand", + "fawe.tips.tip.replace.regex.4": "Tip: Replace using operators: //replace true *[waterlogged=false]", + "fawe.tips.tip.replace.regex.5": "Tip: Replace using operators: //replace true *[level-=1]", + "fawe.tips.tip.replace.id": "Tip: Replace only the block id: //replace woodenstair #id[cobblestair]", + "fawe.tips.tip.replace.light": "Tip: Remove light sources with //replace #brightness[1][15] 0", + "fawe.tips.tip.tab.complete": "Tip: The replace command supports tab completion", + "fawe.tips.tip.flip": "Tip: Mirror with //flip", + "fawe.tips.tip.deform": "Tip: Reshape with //deform", + "fawe.tips.tip.transform": "Tip: Set a transform with //gtransform", + "fawe.tips.tip.copypaste": "Tip: Paste on click with //br copypaste", + "fawe.tips.tip.source.mask": "Tip: Set a source mask with /gsmask ", + "fawe.tips.tip.replace.marker": "Tip: Replace a block with your full clipboard using //replace wool #fullcopy", + "fawe.tips.tip.paste": "Tip: Place with //paste", + "fawe.tips.tip.lazycopy": "Tip: lazycopy is faster", + "fawe.tips.tip.download": "Tip: Try out //download", + "fawe.tips.tip.rotate": "Tip: Orientate with //rotate", + "fawe.tips.tip.copy.pattern": "Tip: To use as a pattern try #copy", + "fawe.tips.tip.regen.0": "Tip: Use a biome with /regen [biome]", + "fawe.tips.tip.regen.1": "Tip: Use a seed with /regen [biome] [seed]", + "fawe.tips.tip.biome.pattern": "Tip: The #biome[forest] pattern can be used in any command", + "fawe.tips.tip.biome.mask": "Tip: Restrict to a biome with the `$jungle` mask", + "fawe.regen.time": "Regenerating region, this might take a while!", + "worldedit.expand.description.vert": "Vertically expand the selection to world limits.", + "worldedit.expand.expanded": "Region expanded {0} blocks", + "worldedit.expand.expanded.vert": "Region expanded {0} blocks (top-to-bottom).", + "worldedit.biomeinfo.lineofsight": "Biomes at line of sight point: {0}", + "worldedit.biomeinfo.position": "Biomes at your position: {0}", + "worldedit.biomeinfo.selection": "Biomes in your selection: {0}", + "worldedit.error.disabled": "This functionality is disabled (see WorldEdit configuration).", + "worldedit.error.no-match": "No match for '{0}'.", + "worldedit.error.unknown": "Unknown error occurred: {0}", + "worldedit.error.parser.player-only": "Input '{0}' requires a player!", + "worldedit.error.parser.bad-state-format": "Bad state format in {0}", + "worldedit.error.parser.unknown-property": "Unknown property '{0}' for block '{1}'", + "worldedit.error.parser.duplicate-property": "Duplicate property: {0}", + "worldedit.error.parser.unknown-value": "Unknown value '{0}' for property '{1}'", + "worldedit.error.parser.invalid-colon": "Invalid colon.", + "worldedit.error.parser.hanging-lbracket": "Invalid format. Hanging bracket at '{0}'.", + "worldedit.error.parser.missing-rbracket": "State is missing trailing ']'", + "worldedit.error.incomplete-region": "Make a region selection first.", + "worldedit.error.not-a-block": "This item is not a block.", + "worldedit.error.unknown-entity": "Entity name '{0}' was not recognized.", + "worldedit.error.unknown-mob": "Mob name '{0}' was not recognized.", + "worldedit.error.parser.clipboard.missing-offset": "Offset specified with @ but no offset given. Use '#copy@[x,y,z]'.", + "worldedit.error.parser.clipboard.missing-coordinates": "Clipboard offset needs x,y,z coordinates.", + "worldedit.error.unknown-item": "Item name '{0}' was not recognized.", + "worldedit.error.parser.invalid-expression": "Invalid expression: {0}", + "worldedit.error.parser.negate-nothing": "Cannot negate nothing!", + "worldedit.error.invalid-page": "Invalid page number", + "worldedit.error.missing-extent": "No Extent is known", + "worldedit.error.missing-session": "No LocalSession is known", + "worldedit.error.missing-world": "You need to provide a world (Try //world)", + "worldedit.error.missing-actor": "No actor is known", + "worldedit.error.no-file-selected": "No file selected.", + "worldedit.error.file-resolution.outside-root": "Path is outside allowable root", + "worldedit.error.file-resolution.resolve-failed": "Failed to resolve path", + "worldedit.error.invalid-filename.invalid-characters": "Invalid characters or extension missing", + "worldedit.error.invalid-number.matches": "Number expected; string \"{0}\" given.", + "worldedit.error.invalid-number": "Number expected; string given.", + "worldedit.error.unknown-block": "Block name '{0}' was not recognized.", + "worldedit.error.disallowed-block": "Block '{0}' not allowed (see WorldEdit configuration).", + "worldedit.error.max-changes": "Max blocks changed in an operation reached ({0}).", + "worldedit.error.max-brush-radius": "Maximum brush radius (in config-legacy.yml): {0}", + "worldedit.error.max-radius": "Maximum radius (in config-legacy.yml): {0}", + "worldedit.error.unknown-direction": "Unknown direction: {0}", + "worldedit.error.empty-clipboard": "Your clipboard is empty. Use //copy first.", + "worldedit.error.invalid-filename": "Filename '{0}' invalid: {1}", + "worldedit.error.file-resolution": "File '{0}' resolution error: {1}", + "worldedit.tool.error.cannot-bind": "Can't bind tool to {0}: {1}", + "worldedit.error.file-aborted": "File selection aborted.", + "worldedit.error.world-unloaded": "The world was unloaded already.", + "worldedit.error.blocks-cant-be-used": "Blocks can't be used", + "worldedit.error.unknown-tag": "Tag name '{0}' was not recognized.", + "worldedit.error.empty-tag": "Tag name '{0}' has no contents.", + "worldedit.error.unknown-biome": "Biome name '{0}' was not recognized.", + "worldedit.brush.radius-too-large": "Maximum allowed brush radius: {0}", + "worldedit.brush.apply.description": "Apply brush, apply a function to every block", + "worldedit.brush.apply.radius": "The size of the brush", + "worldedit.brush.apply.shape": "The shape of the region", + "worldedit.brush.apply.type": "Type of brush to use", + "worldedit.brush.apply.item.warning": "This brush simulates item usages. Its effects may not work on all platforms, may not be undo-able, and may cause strange interactions with other mods/plugins. Use at your own risk.", + "worldedit.brush.paint.description": "Paint brush, apply a function to a surface", + "worldedit.brush.paint.size": "The size of the brush", + "worldedit.brush.paint.shape": "The shape of the region", + "worldedit.brush.paint.density": "The density of the brush", + "worldedit.brush.paint.type": "Type of brush to use", + "worldedit.brush.paint.item.warning": "This brush simulates item usages. Its effects may not work on all platforms, may not be undo-able, and may cause strange interactions with other mods/plugins. Use at your own risk.", + "worldedit.brush.sphere.equip": "Sphere brush shape equipped ({0}).", + "worldedit.brush.cylinder.equip": "Cylinder brush shape equipped ({0} by {1}).", + "worldedit.brush.clipboard.equip": "Clipboard brush shape equipped.", + "worldedit.brush.smooth.equip": "Smooth brush equipped ({0} x {1}x using {2}).", + "worldedit.brush.smooth.nofilter": "any block", + "worldedit.brush.smooth.filter": "filter", + "worldedit.brush.snowsmooth.equip": "SnowSmooth brush equipped ({0} x {1}x using {2}), {3} snow blocks.", + "worldedit.brush.snowsmooth.nofilter": "any block", + "worldedit.brush.snowsmooth.filter": "filter", + "worldedit.brush.extinguish.equip": "Extinguisher equipped ({0}).", + "worldedit.brush.gravity.equip": "Gravity brush equipped ({0}).", + "worldedit.brush.butcher.equip": "Butcher brush equipped ({0}).", + "worldedit.brush.operation.equip": "Set brush to {0}.", + "worldedit.brush.none.equip": "Brush unbound from your current item.", + "worldedit.setbiome.changed": "Biomes were changed in {0} columns. You may have to rejoin your game (or close and reopen your world) to see a change.", + "worldedit.drawsel.disabled": "Server CUI disabled.", + "worldedit.drawsel.enabled": "Server CUI enabled. This only supports cuboid regions, with a maximum size of {0}x{1}x{2}.", + "worldedit.drawsel.disabled.already": "Server CUI already disabled.", + "worldedit.drawsel.enabled.already": "Server CUI already enabled.", + "worldedit.limit.too-high": "Your maximum allowable limit is {0}.", + "worldedit.limit.set": "Block change limit set to {0}.", + "worldedit.limit.return-to-default": "(Use //limit to go back to the default.)", + "worldedit.timeout.too-high": "Your maximum allowable timeout is {0}ms.", + "worldedit.timeout.set": "Timeout time set to {0}ms.", + "worldedit.timeout.return-to-default": " (Use //timeout to go back to the default.)", + "worldedit.fast.disabled": "Fast mode disabled.", + "worldedit.fast.enabled": "Fast mode enabled. Changes won't be written to history (//undo is disabled). Lighting in the affected chunks may be wrong and/or you may need to rejoin to see changes.", + "worldedit.fast.disabled.already": "Fast mode already disabled.", + "worldedit.fast.enabled.already": "Fast mode already enabled.", + "worldedit.perf.sideeffect.set": "Side effect \"{0}\" set to {1}", + "worldedit.perf.sideeffect.get": "Side effect \"{0}\" is set to {1}", + "worldedit.perf.sideeffect.already-set": "Side effect \"{0}\" is already {1}", + "worldedit.perf.sideeffect.set-all": "All side effects set to {0}", + "worldedit.reorder.current": "The reorder mode is {0}", + "worldedit.reorder.set": "The reorder mode is now {0}", + "worldedit.gmask.disabled": "Global mask disabled.", + "worldedit.gmask.set": "Global mask set.", + "worldedit.toggleplace.pos1": "Now placing at pos #1.", + "worldedit.toggleplace.player": "Now placing at the block you stand in.", + "worldedit.toggleplace.not-locatable": "Cannot toggle placing in this context.", + "worldedit.searchitem.too-short": "Enter a longer search string (len > 2).", + "worldedit.searchitem.either-b-or-i": "You cannot use both the 'b' and 'i' flags simultaneously.", + "worldedit.searchitem.searching": "(Please wait... searching items.)", + "worldedit.watchdog.no-hook": "This platform has no watchdog hook.", + "worldedit.watchdog.active.already": "Watchdog hook already active.", + "worldedit.watchdog.inactive.already": "Watchdog hook already inactive.", + "worldedit.watchdog.active": "Watchdog hook now active.", + "worldedit.watchdog.inactive": "Watchdog hook now inactive.", + "worldedit.world.remove": "Removed world override.", + "worldedit.world.set": "Set the world override to {0}. (Use //world to go back to default)", + "worldedit.undo.undone": "Undid {0} available edits.", + "worldedit.undo.none": "Nothing left to undo.", + "worldedit.redo.redone": "Redid {0} available edits.", + "worldedit.redo.none": "Nothing left to redo.", + "worldedit.clearhistory.cleared": "History cleared.", + "worldedit.raytrace.noblock": "No block in sight!", + "worldedit.restore.not-configured": "Snapshot/backup restore is not configured.", + "worldedit.restore.not-available": "That snapshot does not exist or is not available.", + "worldedit.restore.failed": "Failed to load snapshot: {0}", + "worldedit.restore.loaded": "Snapshot '{0}' loaded; now restoring...", + "worldedit.restore.restored": "Restored; {0} missing chunks and {1} other errors.", + "worldedit.restore.none-for-specific-world": "No snapshots were found for world '{0}'.", + "worldedit.restore.none-for-world": "No snapshots were found for this world.", + "worldedit.restore.none-found": "No snapshots were found.", + "worldedit.restore.none-found-console": "No snapshots were found. See console for details.", + "worldedit.restore.chunk-not-present": "Chunks were not present in snapshot.", + "worldedit.restore.chunk-load-failed": "No chunks could be loaded. (Bad archive?)", + "worldedit.restore.block-place-failed": "Errors prevented any blocks from being restored.", + "worldedit.restore.block-place-error": "Last error: {0}", + "worldedit.snapshot.use.newest": "Now using newest snapshot.", + "worldedit.snapshot.use": "Snapshot set to: {0}", + "worldedit.snapshot.none-before": "Couldn't find a snapshot before {0}.", + "worldedit.snapshot.none-after": "Couldn't find a snapshot after {0}.", + "worldedit.snapshot.index-above-0": "Invalid index, must be greater than or equal to 1.", + "worldedit.snapshot.index-oob": "Invalid index, must be between 1 and {0}.", + "worldedit.schematic.unknown-format": "Unknown schematic format: {0}.", + "worldedit.schematic.load.does-not-exist": "Schematic {0} does not exist!", + "worldedit.schematic.load.loading": "(Please wait... loading schematic.)", + "worldedit.schematic.save.already-exists": "That schematic already exists. Use the -f flag to overwrite it.", + "worldedit.schematic.save.failed-directory": "Could not create folder for schematics!", + "worldedit.schematic.save.saving": "(Please wait... saving schematic.)", + "worldedit.schematic.delete.empty": "Schematic {0} not found!", + "worldedit.schematic.delete.does-not-exist": "Schematic {0} does not exist!", + "worldedit.schematic.delete.failed": "Deletion of {0} failed! Is it read-only?", + "worldedit.schematic.delete.deleted": "{0} has been deleted.", + "worldedit.schematic.formats.title": "Available clipboard formats (Name: Lookup names)", + "worldedit.schematic.load.symbol": "[L]", + "worldedit.schematic.plus.symbol": "[+]", + "worldedit.schematic.minus.symbol": "[-]", + "worldedit.schematic.x.symbol": "[X]", + "worldedit.schematic.0.symbol": "[O]", + "worldedit.schematic.dash.symbol": " - ", + "worldedit.schematic.click-to-load": "Click to load", + "worldedit.schematic.load": "Load", + "worldedit.schematic.list": "List", + "worldedit.schematic.available": "Available schematics", + "worldedit.schematic.unload": "Unload", + "worldedit.schematic.delete": "delete", + "worldedit.schematic.visualize": "visualize", + "worldedit.schematic.clipboard": "Add to (multi-)clipboard", + "worldedit.schematic.unknown-filename": "Unknown filename: {0}", + "worldedit.schematic.file-not-exist": "File could not be read or it does not exist: {0}", + "worldedit.schematic.already-exists": "That schematic already exists!", + "worldedit.schematic.failed-to-save": "Failed to save schematic", + "worldedit.schematic.directory-does-not-exist": "Directory '{0}' does not exist!", + "worldedit.schematic.file-perm-fail": "Creation of '{0}' failed! Check file permission.", + "worldedit.schematic.sorting-old-new": "Cannot sort by oldest and newest.", + "worldedit.schematic.unsupported-minecraft-version": "This version of WorldEdit does not support your Minecraft version. Schematics will not work until this is resolved.", + "worldedit.pos.already-set": "Position already set.", + "worldedit.pos.console-require-coords": "You must provide coordinates as console.", + "worldedit.hpos.no-block": "No block in sight!", + "worldedit.hpos.already-set": "Position already set.", + "worldedit.chunk.selected-multiple": "Chunks selected: ({0}, {1}, {2}) - ({3}, {4}, {5})", + "worldedit.chunk.selected": "Chunk selected: {0}, {1}, {2}", + "worldedit.wand.invalid": "Wand item is mis-configured or disabled.", + "worldedit.wand.selwand.info": "Left click: select pos #1; Right click: select pos #2", + "worldedit.wand.selwand.now.tool": "The selection wand is now a normal tool. You can disable it with {0} and rebind it to any item with {1} or get a new wand with {2}.", + "worldedit.wand.navwand.info": "Left click: jump to location; Right click: pass through walls", + "worldedit.contract.contracted": "Region contracted {0} blocks.", + "worldedit.shift.shifted": "Region shifted.", + "worldedit.outset.outset": "Region outset.", + "worldedit.inset.inset": "Region inset.", + "worldedit.size.offset": "{0}: {1} @ {2} ({3} blocks)", + "worldedit.size.type": "Type: {0}", + "worldedit.size.size": "Size: {0}", + "worldedit.size.distance": "Cuboid distance: {0}", + "worldedit.size.blocks": "# of blocks: {0}", + "worldedit.count.counted": "Counted: {0}", + "worldedit.distr.no-blocks": "No blocks counted.", + "worldedit.distr.no-previous": "No previous distribution.", + "worldedit.distr.total": "Total Block Count: {0}", + "worldedit.select.cleared": "Selection cleared.", + "worldedit.select.cuboid.message": "Cuboid: left click for point 1, right click for point 2", + "worldedit.select.cuboid.description": "Select two corners of a cuboid", + "worldedit.select.extend.message": "Cuboid: left click for a starting point, right click to extend", + "worldedit.select.extend.description": "Fast cuboid selection mode", + "worldedit.select.poly.message": "2D polygon selector: Left/right click to add a point.", + "worldedit.select.poly.limit-message": "{0} points maximum.", + "worldedit.select.poly.description": "Select a 2D polygon with height", + "worldedit.select.ellipsoid.message": "Ellipsoid selector: left click=center, right click to extend", + "worldedit.select.ellipsoid.description": "Select an ellipsoid", + "worldedit.select.sphere.message": "Sphere selector: left click=center, right click to set radius", + "worldedit.select.sphere.description": "Select a sphere", + "worldedit.select.cyl.message": "Cylindrical selector: Left click=center, right click to extend", + "worldedit.select.cyl.description": "Select a cylinder", + "worldedit.select.convex.message": "Convex polyhedral selector: Left click=First vertex, right click to add more.", + "worldedit.select.convex.limit-message": "{0} points maximum.", + "worldedit.select.convex.description": "Select a convex polyhedral", + "worldedit.select.default-set": "Your default region selector is now {0}.", + "worldedit.chunkinfo.chunk": "Chunk: {0}, {1}", + "worldedit.chunkinfo.old-filename": "Old format: {0}", + "worldedit.chunkinfo.mcregion-filename": "McRegion: region/{0}", + "worldedit.listchunks.listfor": "Listing chunks for: {0}", + "worldedit.drain.drained": "{0} blocks have been drained.", + "worldedit.fill.created": "{0} blocks have been filled.", + "worldedit.fillr.created": "{0} blocks have been filled.", + "worldedit.fixlava.fixed": "{0} blocks have been fixed.", + "worldedit.fixwater.fixed": "{0} blocks have been fixed.", + "worldedit.removeabove.removed": "{0} blocks have been removed.", + "worldedit.removebelow.removed": "{0} blocks have been removed.", + "worldedit.removenear.removed": "{0} blocks have been removed.", + "worldedit.replacenear.replaced": "{0} blocks have been replaced.", + "worldedit.snow.created": "{0} surfaces have been covered.", + "worldedit.thaw.removed": "{0} blocks have been thawed.", + "worldedit.green.changed": "{0} blocks have been greened.", + "worldedit.extinguish.removed": "{0} fires have been extinguished.", + "worldedit.butcher.killed": "{0} mobs have been killed in a radius of {1}.", + "worldedit.butcher.explain-all": "Use -1 to remove all mobs in loaded chunks", + "worldedit.remove.removed": "{0} entities have been marked for removal.", + "worldedit.remove.explain-all": "Use -1 to remove all entities in loaded chunks", + "worldedit.calc.invalid": "'{0}' could not be parsed as a valid expression", + "worldedit.calc.invalid.with-error": "'{0}' could not be parsed as a valid expression: '{1}'", + "worldedit.paste.pasted": "The clipboard has been pasted at {0}", + "worldedit.paste.selected": "Selected clipboard paste region.", + "worldedit.rotate.no-interpolation": "Note: Interpolation is not yet supported, so angles that are multiples of 90 is recommended.", + "worldedit.rotate.rotated": "The clipboard copy has been rotated.", + "worldedit.flip.flipped": "The clipboard copy has been flipped.", + "worldedit.clearclipboard.cleared": "Clipboard cleared.", + "worldedit.set.done": "Operation completed.", + "worldedit.set.done.verbose": "Operation completed ({0}).", + "worldedit.line.changed": "{0} blocks have been changed.", + "worldedit.line.invalid-type": "//line only works with cuboid selections or convex polyhedral selections", + "worldedit.line.cuboid-only": "//line only works with cuboid selections", + "worldedit.curve.changed": "{0} blocks have been changed.", + "worldedit.curve.invalid-type": "//curve only works with convex polyhedral selections", + "worldedit.curve.convex-only": "//curve only works with convex polyhedral selections", + "worldedit.replace.replaced": "{0} blocks have been replaced.", + "worldedit.stack.changed": "{0} blocks changed. Undo with //undo", + "worldedit.regen.regenerated": "Region regenerated.", + "worldedit.regen.failed": "Unable to regenerate chunks. Check console for details.", + "worldedit.walls.changed": "{0} blocks have been changed.", + "worldedit.faces.changed": "{0} blocks have been changed.", + "worldedit.overlay.overlaid": "{0} blocks have been overlaid.", + "worldedit.naturalize.naturalized": "{0} block(s) have been made to look more natural.", + "worldedit.center.changed": "Center set. ({0} blocks changed)", + "worldedit.smooth.changed": "Terrain's height map smoothed. {0} blocks changed.", + "worldedit.snowsmooth.changed": "Snow's height map smoothed. {0} blocks changed.", + "worldedit.move.moved": "{0} blocks moved.", + "worldedit.deform.deformed": "{0} blocks have been deformed.", + "worldedit.hollow.changed": "{0} blocks have been changed.", + "worldedit.forest.created": "{0} trees created.", + "worldedit.flora.created": "{0} flora created.", + "worldedit.unstuck.moved": "There you go!", + "worldedit.ascend.obstructed": "No free spot above you found.", + "worldedit.ascend.moved": "Ascended {0} levels.", + "worldedit.descend.obstructed": "No free spot below you found.", + "worldedit.descend.moved": "Descended {0} levels.", + "worldedit.ceil.obstructed": "No free spot above you found.", + "worldedit.ceil.moved": "Woosh!", + "worldedit.thru.obstructed": "No free spot ahead of you found.", + "worldedit.thru.moved": "Woosh!", + "worldedit.jumpto.moved": "Poof!", + "worldedit.jumpto.none": "No block in sight (or too far away)!", + "worldedit.up.obstructed": "You would hit something above you.", + "worldedit.up.moved": "Woosh!", + "worldedit.cyl.invalid-radius": "You must either specify 1 or 2 radius values.", + "worldedit.cyl.created": "{0} blocks have been created.", + "worldedit.hcyl.thickness-too-large": "Thickness cannot be larger than x or z radii.", + "worldedit.sphere.invalid-radius": "You must either specify 1 or 3 radius values.", + "worldedit.sphere.created": "{0} blocks have been created.", + "worldedit.forestgen.created": "{0} trees created.", + "worldedit.pumpkins.created": "{0} pumpkin patches created.", + "worldedit.pyramid.created": "{0} blocks have been created.", + "worldedit.generate.created": "{0} blocks have been created.", + "worldedit.generatebiome.changed": "{0} biomes affected.", + "worldedit.reload.config": "Configuration reloaded!", + "worldedit.report.written": "FAWE report written to {0}", + "worldedit.report.error": "Failed to write report: {0}", + "worldedit.report.callback": "FAWE report: {0}.report", + "worldedit.timezone.invalid": "Invalid timezone", + "worldedit.timezone.set": "Timezone set for this session to: {0}", + "worldedit.timezone.current": "The current time in that timezone is: {0}", + "worldedit.version.version": "FAWE version:\n - Date {0}\n - Commit {1}\n - Build {2}\n - Platform {3}", + "worldedit.version.bukkit.unsupported-adapter": "This FAWE version does not fully support your version of Bukkit. Block entities (e.g. chests) will be empty, block properties (e.g. rotation) will be missing, and other things may not work.\nUpdate FAWE and your server software to restore this functionality:\n{0}", + "worldedit.trace.no-tracing-extents": "Trace: No extent was used.", + "worldedit.trace.action-failed": "Trace: Action(s) {0} at {1} discarded by extent {2}", + "worldedit.trace.active.already": "Trace mode already active.", + "worldedit.trace.inactive.already": "Trace mode already inactive.", + "worldedit.trace.active": "Trace mode now active.", + "worldedit.trace.inactive": "Trace mode now inactive.", + "worldedit.command.time-elapsed": "{0}s elapsed (history: {1} changed; {2} blocks/sec).", + "worldedit.command.permissions": "You are not permitted to do that. Are you in the right mode?", + "worldedit.command.player-only": "This command must be used with a player.", + "worldedit.command.error.report": "&cPlease report this error: [See console]", + "worldedit.command.deprecation": "This command is deprecated.", + "worldedit.command.deprecation-message": "Please use '{0}' instead.", + "worldedit.pastebin.uploading": "(Please wait... sending output to paste service...)", + "worldedit.session.cant-find-session": "Unable to find session for {0}", + "worldedit.platform.no-file-dialog": "File dialogs are not supported in your environment.", + "worldedit.tool.max-block-changes": "Max blocks change limit reached.", + "worldedit.tool.no-block": "No block in sight!", + "worldedit.tool.repl.equip": "Block replacer tool bound to {0}.", + "worldedit.tool.repl.switched": "Replacer tool switched to: {0}", + "worldedit.tool.data-cycler.equip": "Block data cycler tool bound to {0}.", + "worldedit.tool.data-cycler.block-not-permitted": "You are not permitted to cycle the data value of that block.", + "worldedit.tool.data-cycler.cant-cycle": "That block's data cannot be cycled!", + "worldedit.tool.data-cycler.new-value": "Value of {0} is now {1}.", + "worldedit.tool.data-cycler.cycling": "Now cycling {0}.", + "worldedit.tool.deltree.equip": "Floating tree remover tool bound to {0}.", + "worldedit.tool.deltree.not-tree": "That's not a tree.", + "worldedit.tool.deltree.not-floating": "That's not a floating tree.", + "worldedit.tool.tree.equip": "Tree tool bound to {0}.", + "worldedit.tool.tree.obstructed": "A tree can't go there.", + "worldedit.tool.info.equip": "Info tool bound to {0}.", + "worldedit.tool.inspect.equip": "Inspect tool bound to {0}.", + "worldedit.tool.info.blockstate.hover": "Block state", + "worldedit.tool.info.internalid.hover": "Internal ID", + "worldedit.tool.info.legacy.hover": "Legacy id:data", + "worldedit.tool.info.light.hover": "Block Light/Light Above", + "worldedit.tool.none.equip": "Tool unbound from your current item.", + "worldedit.tool.selwand.equip": "Selection wand bound to {0}.", + "worldedit.tool.navwand.equip": "Navigation wand bound to {0}.", + "worldedit.tool.floodfill.equip": "Block flood fill tool bound to {0}.", + "worldedit.tool.farwand.equip": "Far wand tool bound to {0}.", + "worldedit.tool.lrbuild.equip": "Long-range building tool bound to {0}.", + "worldedit.tool.lrbuild.set": "Left-click set to {0}; right-click set to {1}.", + "worldedit.tool.stack.equip": "Stack tool bound to {0}.", + "worldedit.tool.unbind-instruction": "Run {0} while holding the item to unbind it.", + "worldedit.tool.superpickaxe.mode.single": "Mode is now single. Left click with a pickaxe. // to disable.", + "worldedit.tool.superpickaxe.mode.area": "Mode is now area. Left click with a pickaxe. // to disable.", + "worldedit.tool.superpickaxe.mode.recursive": "Mode is now recursive. Left click with a pickaxe. // to disable.", + "worldedit.tool.superpickaxe.max-range": "Maximum range is {0}.", + "worldedit.tool.superpickaxe.enabled.already": "Super pickaxe already enabled.", + "worldedit.tool.superpickaxe.disabled.already": "Super pickaxe already disabled.", + "worldedit.tool.superpickaxe.enabled": "Super pickaxe enabled.", + "worldedit.tool.superpickaxe.disabled": "Super pickaxe disabled.", + "worldedit.tool.mask.set": "Brush mask set.", + "worldedit.tool.mask.disabled": "Brush mask disabled.", + "worldedit.tool.material.set": "Brush material set.", + "worldedit.tool.range.set": "Brush range set.", + "worldedit.tool.size.set": "Brush size set.", + "worldedit.tool.tracemask.set": "Trace mask set.", + "worldedit.tool.tracemask.disabled": "Trace mask disabled.", + "worldedit.execute.script-permissions": "You don't have permission to use that script.", + "worldedit.executelast.no-script": "Use /cs with a script name first.", + "worldedit.script.read-error": "Script read error: {0}", + "worldedit.script.unsupported": "Only .js scripts are currently supported", + "worldedit.script.file-not-found": "Script does not exist: {0}", + "worldedit.script.no-script-engine": "Failed to find an installed script engine.\nPlease see https://worldedit.enginehub.org/en/latest/usage/other/craftscripts/", + "worldedit.script.failed": "Failed to execute: {0}", + "worldedit.script.failed-console": "Failed to execute (see console): {0}", + "worldedit.operation.affected.biome": "{0} biomes affected", + "worldedit.operation.affected.block": "{0} blocks affected", + "worldedit.operation.affected.column": "{0} columns affected", + "worldedit.operation.affected.entity": "{0} entities affected", + "worldedit.operation.deform.expression": "deformed using {0}", + "worldedit.error.parser.invalid-nbt": "Invalid NBT Data in input: '{0}'. Error: {1}", + "worldedit.selection.convex.info.vertices": "Vertices: {0}", + "worldedit.selection.convex.info.triangles": "Triangles: {0}", + "worldedit.selection.convex.explain.primary": "Started new selection with vertex {0}.", + "worldedit.selection.convex.explain.secondary": "Added vertex {0} to the selection.", + "worldedit.selection.cuboid.info.pos1": "Position 1: {0}", + "worldedit.selection.cuboid.info.pos2": "Position 2: {0}", + "worldedit.selection.cuboid.explain.primary": "First position set to {0}.", + "worldedit.selection.cuboid.explain.primary-area": "First position set to {0} ({1}).", + "worldedit.selection.cuboid.explain.secondary": "Second position set to {0}.", + "worldedit.selection.cuboid.explain.secondary-area": "Second position set to {0} ({1}).", + "worldedit.selection.extend.explain.primary": "Started selection at {0} ({1}).", + "worldedit.selection.extend.explain.secondary": "Extended selection to encompass {0} ({1}).", + "worldedit.selection.ellipsoid.info.center": "Center: {0}", + "worldedit.selection.ellipsoid.info.radius": "X/Y/Z Radius: {0}", + "worldedit.selection.ellipsoid.explain.primary": "Center position set to {0}.", + "worldedit.selection.ellipsoid.explain.primary-area": "Center position set to {0} ({1}).", + "worldedit.selection.ellipsoid.explain.secondary": "Radius set to {0}.", + "worldedit.selection.ellipsoid.explain.secondary-area": "Radius set to {0} ({1}).", + "worldedit.selection.cylinder.info.center": "Center: {0}", + "worldedit.selection.cylinder.info.radius": "Radius: {0}", + "worldedit.selection.cylinder.explain.primary": "Starting a new cylindrical selection at {0}.", + "worldedit.selection.cylinder.explain.secondary": "Radius set to {0}/{1} blocks. ({2})", + "worldedit.selection.cylinder.explain.secondary-missing": "You must select the center point before setting the radius.", + "worldedit.selection.polygon2d.info": "# points: {0}", + "worldedit.selection.polygon2d.explain.primary": "Starting a new polygon at {0}.", + "worldedit.selection.polygon2d.explain.secondary": "Added point #{0} at {1}.", + "worldedit.selection.sphere.explain.secondary": "Radius set to {0}.", + "worldedit.selection.sphere.explain.secondary-defined": "Radius set to {0} ({1}).", + "worldedit.sideeffect.lighting": "Lighting", + "worldedit.sideeffect.lighting.description": "Updates block lighting", + "worldedit.sideeffect.neighbors": "Neighbors", + "worldedit.sideeffect.neighbors.description": "Notifies nearby blocks of changes", + "worldedit.sideeffect.update": "Update", + "worldedit.sideeffect.update.description": "Notifies the changed block", + "worldedit.sideeffect.validation": "Validation", + "worldedit.sideeffect.validation.description": "Validates and fixes inconsistent world state, such as disconnected blocks", + "worldedit.sideeffect.entity_ai": "Entity AI", + "worldedit.sideeffect.entity_ai.description": "Updates Entity AI paths for the block changes", + "worldedit.sideeffect.events": "Mod/Plugin Events", + "worldedit.sideeffect.events.description": "Tells other mods/plugins about these changes when applicable", + "worldedit.sideeffect.state.on": "On", + "worldedit.sideeffect.state.delayed": "Delayed", + "worldedit.sideeffect.state.off": "Off", + "worldedit.sideeffect.box.current": "Current", + "worldedit.sideeffect.box.change-to": "Click to set to {0}", + "worldedit.help.command-not-found": "The command '{0}' could not be found.", + "worldedit.help.no-subcommands": "'{0}' has no sub-commands. (Maybe '{1}' is for a parameter?)", + "worldedit.help.subcommand-not-found": "The sub-command '{0}' under '{1}' could not be found.", + "worldedit.cli.stopping": "Stopping!", + "worldedit.cli.unknown-command": "Unknown command!" } diff --git a/worldedit-core/src/test/java/com/sk89q/minecraft/util/commands/CommandContextTest.java b/worldedit-core/src/test/java/com/sk89q/minecraft/util/commands/CommandContextTest.java index 838e743d1..3d79a23d3 100644 --- a/worldedit-core/src/test/java/com/sk89q/minecraft/util/commands/CommandContextTest.java +++ b/worldedit-core/src/test/java/com/sk89q/minecraft/util/commands/CommandContextTest.java @@ -147,7 +147,7 @@ public class CommandContextTest { public void testSlice() { try { CommandContext context = new CommandContext("foo bar baz"); - assertArrayEquals(new String[] { "foo", "bar", "baz" }, context.getSlice(0)); + assertArrayEquals(new String[]{"foo", "bar", "baz"}, context.getSlice(0)); } catch (CommandException e) { LOGGER.warn("Error", e); @@ -165,4 +165,5 @@ public class CommandContextTest { fail("Error creating CommandContext"); } } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/command/CommandArgParserTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/command/CommandArgParserTest.java index 137613caf..b6afac80e 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/command/CommandArgParserTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/command/CommandArgParserTest.java @@ -37,22 +37,23 @@ class CommandArgParserTest { @Test void testArgumentParsing() { assertEquals(ImmutableList.of( - Substring.wrap("", 0, 0) + Substring.wrap("", 0, 0) ), argParse("")); assertEquals(ImmutableList.of( - Substring.wrap("ab", 0, 2) + Substring.wrap("ab", 0, 2) ), argParse("ab")); assertEquals(ImmutableList.of( - Substring.wrap("", 0, 0), - Substring.wrap("", 1, 1) + Substring.wrap("", 0, 0), + Substring.wrap("", 1, 1) ), argParse(" ")); assertEquals(ImmutableList.of( - Substring.wrap("a", 0, 1), - Substring.wrap("", 2, 2) + Substring.wrap("a", 0, 1), + Substring.wrap("", 2, 2) ), argParse("a ")); assertEquals(ImmutableList.of( - Substring.wrap("a", 0, 1), - Substring.wrap("b", 2, 3) + Substring.wrap("a", 0, 1), + Substring.wrap("b", 2, 3) ), argParse("a b")); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/BaseExpressionTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/BaseExpressionTest.java index b70c9f574..0fbf9556a 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/BaseExpressionTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/BaseExpressionTest.java @@ -122,4 +122,5 @@ class BaseExpressionTest { expression.optimize(); return expression; } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTest.java index 6d39e20f7..ec175bd72 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTest.java @@ -42,39 +42,39 @@ class ExpressionTest extends BaseExpressionTest { @TestFactory public Stream testEvaluate() throws ExpressionException { List testCases = ImmutableList.of( - // basic arithmetic - testCase("1 - 2 + 3", 2), - // unary ops - testCase("2 + +4", 6), - testCase("2 - -4", 6), - testCase("2 * -4", -8), - // check functions - testCase("sin(5)", sin(5)), - testCase("atan2(3, 4)", atan2(3, 4)), - testCase("min(1, 2)", 1), - testCase("max(1, 2)", 2), - testCase("max(1, 2, 3, 4, 5)", 5), - // check conditionals - testCase("0 || 5", 5), - testCase("2 || 5", 2), - testCase("2 && 5", 5), - testCase("5 && 0", 0), - // check ternaries - testCase("false ? 1 : 2", 2), - testCase("true ? 1 : 2", 1), - // - ternary binds inside - testCase("true ? true ? 1 : 2 : 3", 1), - testCase("true ? false ? 1 : 2 : 3", 2), - testCase("false ? true ? 1 : 2 : 3", 3), - testCase("false ? false ? 1 : 2 : 3", 3), - // check return - testCase("return 1; 0", 1) + // basic arithmetic + testCase("1 - 2 + 3", 2), + // unary ops + testCase("2 + +4", 6), + testCase("2 - -4", 6), + testCase("2 * -4", -8), + // check functions + testCase("sin(5)", sin(5)), + testCase("atan2(3, 4)", atan2(3, 4)), + testCase("min(1, 2)", 1), + testCase("max(1, 2)", 2), + testCase("max(1, 2, 3, 4, 5)", 5), + // check conditionals + testCase("0 || 5", 5), + testCase("2 || 5", 2), + testCase("2 && 5", 5), + testCase("5 && 0", 0), + // check ternaries + testCase("false ? 1 : 2", 2), + testCase("true ? 1 : 2", 1), + // - ternary binds inside + testCase("true ? true ? 1 : 2 : 3", 1), + testCase("true ? false ? 1 : 2 : 3", 2), + testCase("false ? true ? 1 : 2 : 3", 3), + testCase("false ? false ? 1 : 2 : 3", 3), + // check return + testCase("return 1; 0", 1) ); return testCases.stream() - .map(testCase -> dynamicTest( - testCase.getExpression(), - () -> checkTestCase(testCase) - )); + .map(testCase -> dynamicTest( + testCase.getExpression(), + () -> checkTestCase(testCase) + )); } @Test @@ -82,8 +82,10 @@ class ExpressionTest extends BaseExpressionTest { assertEquals(8, compile("foo+bar", "foo", "bar").evaluate(5D, 3D), 0); // variables need to be assigned first - EvaluationException ex = assertThrows(EvaluationException.class, - () -> simpleEval("a*=5")); + EvaluationException ex = assertThrows( + EvaluationException.class, + () -> simpleEval("a*=5") + ); assertTrue(ex.getMessage().contains("not initialized yet")); // can't modify e, pi, true, false @@ -93,11 +95,11 @@ class ExpressionTest extends BaseExpressionTest { @TestFactory Stream testModifyConstants() { return Stream.of("e", "pi", "true", "false").map(constant -> - dynamicTest(constant, () -> { - EvaluationException ex = assertThrows(EvaluationException.class, () -> - simpleEval(constant + "++")); - assertTrue(ex.getMessage().endsWith("'" + constant + "' is not a variable")); - })); + dynamicTest(constant, () -> { + EvaluationException ex = assertThrows(EvaluationException.class, () -> + simpleEval(constant + "++")); + assertTrue(ex.getMessage().endsWith("'" + constant + "' is not a variable")); + })); } @Test @@ -214,45 +216,63 @@ class ExpressionTest extends BaseExpressionTest { public void testErrors() { // test lexer errors { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("#")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("#") + ); assertEquals(0, e.getPosition(), "Error position"); } // test parser errors { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("x")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("x") + ); assertEquals(0, e.getPosition(), "Error position"); } { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("x()")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("x()") + ); assertEquals(0, e.getPosition(), "Error position"); } { // verify that you must return a value - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("return")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("return") + ); assertEquals(6, e.getPosition(), "Error position"); } - assertThrows(ExpressionException.class, - () -> compile("(")); - assertThrows(ExpressionException.class, - () -> compile("x(")); + assertThrows( + ExpressionException.class, + () -> compile("(") + ); + assertThrows( + ExpressionException.class, + () -> compile("x(") + ); // test overloader errors { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("atan2(1)")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("atan2(1)") + ); assertEquals(0, e.getPosition(), "Error position"); } { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("atan2(1, 2, 3)")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("atan2(1, 2, 3)") + ); assertEquals(0, e.getPosition(), "Error position"); } { - ExpressionException e = assertThrows(ExpressionException.class, - () -> compile("rotate(1, 2, 3)")); + ExpressionException e = assertThrows( + ExpressionException.class, + () -> compile("rotate(1, 2, 3)") + ); assertEquals(7, e.getPosition(), "Error position"); } @@ -289,41 +309,41 @@ class ExpressionTest extends BaseExpressionTest { checkTestCase("c=5; a=0; while (c > 0) { ++a; --c; } a", 5); checkTestCase("c=5; a=0; do { ++a; --c; } while (c > 0); a", 5); checkTestCase("" + - "c=5;" + - "a=0;" + - "while (c > 0) {" + - " ++a;" + - " --c;" + - " if (c == 1) break;" + - "}" + - "a", 4); + "c=5;" + + "a=0;" + + "while (c > 0) {" + + " ++a;" + + " --c;" + + " if (c == 1) break;" + + "}" + + "a", 4); checkTestCase("" + - "c=5;" + - "a=0;" + - "while (c > 0) {" + - " ++a;" + - " if (a < 5) continue;" + - " --c;" + - "}" + - "a", 9); + "c=5;" + + "a=0;" + + "while (c > 0) {" + + " ++a;" + + " if (a < 5) continue;" + + " --c;" + + "}" + + "a", 9); checkTestCase("" + - "c=5;" + - "a=0;" + - "do {" + - " ++a;" + - " --c;" + - " if (c == 1) break;" + - "} while (c > 0);" + - "a", 4); + "c=5;" + + "a=0;" + + "do {" + + " ++a;" + + " --c;" + + " if (c == 1) break;" + + "} while (c > 0);" + + "a", 4); checkTestCase("" + - "c=5;" + - "a=0;" + - "do {" + - " ++a;" + - " if (a < 5) continue;" + - " --c;" + - "} while (c > 0);" + - "a", 9); + "c=5;" + + "a=0;" + + "do {" + + " ++a;" + + " if (a < 5) continue;" + + " --c;" + + "} while (c > 0);" + + "a", 9); } @Test @@ -331,33 +351,33 @@ class ExpressionTest extends BaseExpressionTest { checkTestCase("a=0; for (i=0; i<5; ++i) { ++a; } a", 5); checkTestCase("y=0; for (i=1,5) { y *= 10; y += i; } y", 12345); checkTestCase("" + - "a=0;" + - "for (c = 5; c > 0; c--) {" + - " ++a;" + - " if (c == 2) break;" + - "}" + - "a", 4); + "a=0;" + + "for (c = 5; c > 0; c--) {" + + " ++a;" + + " if (c == 2) break;" + + "}" + + "a", 4); checkTestCase("" + - "a=0;" + - "for (c = 5; c > 0; c--) {" + - " if (a > 1) continue;" + - " ++a;" + - "}" + - "a", 2); + "a=0;" + + "for (c = 5; c > 0; c--) {" + + " if (a > 1) continue;" + + " ++a;" + + "}" + + "a", 2); checkTestCase("" + - "a=0;" + - "for (c = 1,5) {" + - " ++a;" + - " if (c == 4) break;" + - "}" + - "a", 4); + "a=0;" + + "for (c = 1,5) {" + + " ++a;" + + " if (c == 4) break;" + + "}" + + "a", 4); checkTestCase("" + - "a=0;" + - "for (c = 1,5) {" + - " if (a > 1) continue;" + - " ++a;" + - "}" + - "a", 2); + "a=0;" + + "for (c = 1,5) {" + + " if (a > 1) continue;" + + " ++a;" + + "}" + + "a", 2); } @Test @@ -375,33 +395,33 @@ class ExpressionTest extends BaseExpressionTest { // try to continue in a switch :P { EvaluationException ex = assertThrows(EvaluationException.class, () -> simpleEval("" + - "switch(1) {" + - " case 1: continue;" + - "}")); + "switch(1) {" + + " case 1: continue;" + + "}")); assertTrue(ex.getMessage().contains("continue in a switch")); } { EvaluationException ex = assertThrows(EvaluationException.class, () -> simpleEval("" + - "switch(1) {" + - " default: continue;" + - "}")); + "switch(1) {" + + " default: continue;" + + "}")); assertTrue(ex.getMessage().contains("continue in a switch")); } // duplicate case checks { EvaluationException ex = assertThrows(EvaluationException.class, () -> simpleEval("" + - "switch(1) {" + - " case 1: 1;" + - " case 1: 1;" + - "}")); + "switch(1) {" + + " case 1: 1;" + + " case 1: 1;" + + "}")); assertTrue(ex.getMessage().contains("Duplicate cases")); } { EvaluationException ex = assertThrows(EvaluationException.class, () -> simpleEval("" + - "switch(1) {" + - " default: 1;" + - " default: 1;" + - "}")); + "switch(1) {" + + " default: 1;" + + " default: 1;" + + "}")); assertTrue(ex.getMessage().contains("Duplicate default cases")); } } @@ -420,9 +440,11 @@ class ExpressionTest extends BaseExpressionTest { @Test public void testTimeout() { ExpressionTimeoutException e = assertTimeoutPreemptively(Duration.ofSeconds(10), () -> - assertThrows(ExpressionTimeoutException.class, - () -> simpleEval("for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}"), - "Loop was not stopped.") + assertThrows( + ExpressionTimeoutException.class, + () -> simpleEval("for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}"), + "Loop was not stopped." + ) ); assertTrue(e.getMessage().contains("Calculations exceeded time limit")); } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTestCase.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTestCase.java index fc25a55e5..d4ce551dc 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTestCase.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTestCase.java @@ -45,4 +45,5 @@ public class ExpressionTestCase { public String toString() { return expression + " -> " + result; } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/RealExpressionTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/RealExpressionTest.java index 181903829..444e1db9d 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/RealExpressionTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/RealExpressionTest.java @@ -49,7 +49,8 @@ class RealExpressionTest extends BaseExpressionTest { postChecks.accept(expr); double data = readSlot(expr, "data"); assertEquals(expectedData, (int) data, - "Test case " + this + " failed (data)"); + "Test case " + this + " failed (data)" + ); }); } @@ -57,6 +58,7 @@ class RealExpressionTest extends BaseExpressionTest { public String toString() { return loc + " -> " + result; } + } private static TestCase testCase(Vector3 loc, double result) { @@ -73,44 +75,51 @@ class RealExpressionTest extends BaseExpressionTest { for (TestCase aCase : cases) { Vector3 loc = aCase.loc; assertEquals(aCase.result, compiled.evaluate(loc.getX(), loc.getY(), loc.getZ()), 0, - "Test case " + aCase + " failed (result)"); + "Test case " + aCase + " failed (result)" + ); aCase.postChecks.accept(compiled); } } @Test void torus() { - checkExpression("(0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2", - testCase(Vector3.at(0, 0, 0), 0), - testCase(Vector3.at(0.5, 0.5, 0.5), 0), - testCase(Vector3.at(1, 0, 0), 0), - testCase(Vector3.at(0.5, 0.5, 0), 1), - testCase(Vector3.at(0.75, 0.5, 0), 1), - testCase(Vector3.at(0.75, 0, 0), 1)); + checkExpression( + "(0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2", + testCase(Vector3.at(0, 0, 0), 0), + testCase(Vector3.at(0.5, 0.5, 0.5), 0), + testCase(Vector3.at(1, 0, 0), 0), + testCase(Vector3.at(0.5, 0.5, 0), 1), + testCase(Vector3.at(0.75, 0.5, 0), 1), + testCase(Vector3.at(0.75, 0, 0), 1) + ); } @Test void gnarledOakTree() { - checkExpression("(0.5+sin(atan2(x,z)*8)*0.2)*(sqrt(x*x+z*z)/0.5)^(-2)-1.2 < y", - testCase(Vector3.at(-1, -1, -1), 1), - testCase(Vector3.at(-1, 0, 1), 1), - testCase(Vector3.at(1, 1, 1), 1), - testCase(Vector3.at(0, 0, -1), 1), - testCase(Vector3.at(0, 0, 0), 0), - testCase(Vector3.at(0, 1, 0), 0), - testCase(Vector3.at(0, 0, 0.32274), 0), - testCase(Vector3.at(0, 0, 0.32275), 1)); + checkExpression( + "(0.5+sin(atan2(x,z)*8)*0.2)*(sqrt(x*x+z*z)/0.5)^(-2)-1.2 < y", + testCase(Vector3.at(-1, -1, -1), 1), + testCase(Vector3.at(-1, 0, 1), 1), + testCase(Vector3.at(1, 1, 1), 1), + testCase(Vector3.at(0, 0, -1), 1), + testCase(Vector3.at(0, 0, 0), 0), + testCase(Vector3.at(0, 1, 0), 0), + testCase(Vector3.at(0, 0, 0.32274), 0), + testCase(Vector3.at(0, 0, 0.32275), 1) + ); } @Test void rainbowTorus() { - checkExpression("data=(32+15/2/pi*atan2(x,y))%16; (0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2", - testCase(Vector3.at(0, 0, 0), 0), - testCase(Vector3.at(0.5, 0.5, 0.5), 0), - testCase(Vector3.at(1, 0, 0), 0), - testCase(Vector3.at(0.5, 0.5, 0), 1).withData(1), - testCase(Vector3.at(0.75, 0.5, 0), 1).withData(2), - testCase(Vector3.at(0.75, 0, 0), 1).withData(3)); + checkExpression( + "data=(32+15/2/pi*atan2(x,y))%16; (0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2", + testCase(Vector3.at(0, 0, 0), 0), + testCase(Vector3.at(0.5, 0.5, 0.5), 0), + testCase(Vector3.at(1, 0, 0), 0), + testCase(Vector3.at(0.5, 0.5, 0), 1).withData(1), + testCase(Vector3.at(0.75, 0.5, 0), 1).withData(2), + testCase(Vector3.at(0.75, 0, 0), 1).withData(3) + ); } @Test @@ -118,53 +127,64 @@ class RealExpressionTest extends BaseExpressionTest { TestCase[] testCases = new TestCase[15]; for (int i = 0; i < testCases.length; i++) { testCases[i] = testCase(Vector3.at(0, i / 16.0 - 0.5, 0), 1) - .withData((i + 9) % 16); + .withData((i + 9) % 16); } testCases = Stream.concat(Stream.of(testCases), Stream.of( - testCase(Vector3.at(0, 1, 0), 0) + testCase(Vector3.at(0, 1, 0), 0) )).toArray(TestCase[]::new); - checkExpression("data=(32+y*16+1)%16; y^2/9+x^2/6*(1/(1-0.4*y))+z^2/6*(1/(1-0.4*y))<0.08", - testCases); + checkExpression( + "data=(32+y*16+1)%16; y^2/9+x^2/6*(1/(1-0.4*y))+z^2/6*(1/(1-0.4*y))<0.08", + testCases + ); } @Test void heart() { - checkExpression("(z/2)^2+x^2+(5*y/4-sqrt(abs(x)))^2<0.6", - testCase(Vector3.at(0, 0, -1), 1), - testCase(Vector3.at(0, 1, -1), 0), - testCase(Vector3.at(-0.5, 1, 0), 1)); + checkExpression( + "(z/2)^2+x^2+(5*y/4-sqrt(abs(x)))^2<0.6", + testCase(Vector3.at(0, 0, -1), 1), + testCase(Vector3.at(0, 1, -1), 0), + testCase(Vector3.at(-0.5, 1, 0), 1) + ); } @Test void sineWave() { - checkExpression("sin(x*5)/2-0.03", - testCase(Vector3.at(0, 0, 0), 1), - testCase(Vector3.at(0, 1, 0), 1), - testCase(Vector3.at(0, 1, 1), 1), - testCase(Vector3.at(1, 1, 1), 1), - testCase(Vector3.at(0, 0, 1), 0), - testCase(Vector3.at(1, 0, 1), 0)); + checkExpression( + "-(z^2/12)+(y^2/4)-(x^2/12)>-0.03", + testCase(Vector3.at(0, 0, 0), 1), + testCase(Vector3.at(0, 1, 0), 1), + testCase(Vector3.at(0, 1, 1), 1), + testCase(Vector3.at(1, 1, 1), 1), + testCase(Vector3.at(0, 0, 1), 0), + testCase(Vector3.at(1, 0, 1), 0) + ); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/DeprecationUtilTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/DeprecationUtilTest.java index 2c886049b..0a69087f7 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/DeprecationUtilTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/DeprecationUtilTest.java @@ -28,37 +28,44 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class DeprecationUtilTest { public interface ModifiedApi { + @Deprecated default boolean oldApi() { return newApi(); } @NonAbstractForCompatibility( - delegateName = "oldApi", - delegateParams = {} + delegateName = "oldApi", + delegateParams = {} ) default boolean newApi() { DeprecationUtil.checkDelegatingOverride(getClass()); return oldApi(); } + } public static class OldImpl implements ModifiedApi { + @SuppressWarnings("deprecation") @Override public boolean oldApi() { return false; } + } public static class NewImpl implements ModifiedApi { + @Override public boolean newApi() { return true; } + } public static class NewBadImpl implements ModifiedApi { + } @Test diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/RegionOptimizedVectorSorterTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/RegionOptimizedVectorSorterTest.java index d3d5e29cd..bb4a26739 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/RegionOptimizedVectorSorterTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/internal/util/RegionOptimizedVectorSorterTest.java @@ -39,6 +39,7 @@ import static org.junit.jupiter.api.Assertions.fail; * Verifies that {@link RegionOptimizedVectorSorter} sorts properly. */ public class RegionOptimizedVectorSorterTest { + /** * Find factors, smallest to biggest. * @@ -64,10 +65,10 @@ public class RegionOptimizedVectorSorterTest { } @ParameterizedTest( - name = "size={0}" + name = "size={0}" ) @ValueSource(ints = { - 0, 1, 10, 100, 1_000, 10_000, 100_000, 1_000_000, 10_000_000 + 0, 1, 10, 100, 1_000, 10_000, 100_000, 1_000_000, 10_000_000 }) void checkSorted(int size) { Random rng = new Random(size); @@ -84,7 +85,7 @@ public class RegionOptimizedVectorSorterTest { int minZ = z / 2; int maxZ = minZ + z % 2; toSort = Lists.newArrayList(new CuboidRegion( - BlockVector3.at(-minX, 0, -minZ), BlockVector3.at(maxX - 1, 0, maxZ - 1) + BlockVector3.at(-minX, 0, -minZ), BlockVector3.at(maxX - 1, 0, maxZ - 1) )); } assertEquals(size, toSort.size()); @@ -104,23 +105,23 @@ public class RegionOptimizedVectorSorterTest { String spaceship = "(" + curr + " <=> " + next + ")"; if (currRegionX > nextRegionX) { fail(spaceship + " " - + currRegionX + " region x should be less than or equal to " + nextRegionX); + + currRegionX + " region x should be less than or equal to " + nextRegionX); } else if (currRegionX == nextRegionX) { if (currRegionZ > nextRegionZ) { fail(spaceship + " " - + currRegionZ + " region z should be less than or equal to " + nextRegionZ); + + currRegionZ + " region z should be less than or equal to " + nextRegionZ); } else if (currRegionZ == nextRegionZ) { if (currChunkX > nextChunkX) { fail(spaceship + " " - + currChunkX + " chunk x should be less than or equal to " + nextChunkX); + + currChunkX + " chunk x should be less than or equal to " + nextChunkX); } else if (currChunkX == nextChunkX) { if (currChunkZ > nextChunkZ) { fail(spaceship + " " - + currChunkZ + " chunk z should be less than or equal to " + nextChunkZ); + + currChunkZ + " chunk z should be less than or equal to " + nextChunkZ); } else if (currChunkZ == nextChunkZ) { if (curr.getY() < next.getY()) { fail(spaceship + " " - + curr + " y should be greater than or equal to " + next); + + curr + " y should be greater than or equal to " + next); } } } @@ -128,4 +129,5 @@ public class RegionOptimizedVectorSorterTest { } } } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/LocationTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/LocationTest.java index 518b1f320..44962055b 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/LocationTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/LocationTest.java @@ -150,7 +150,7 @@ public class LocationTest { World world = mock(World.class); long start = System.currentTimeMillis(); BlockVector3 location1 = BlockVector3.ZERO; - location1.add(10,10,10); + location1.add(10, 10, 10); System.out.println(System.currentTimeMillis() - start + " ms"); } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/collection/PositionListTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/collection/PositionListTest.java index fda8d867d..95e1c7eca 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/collection/PositionListTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/collection/PositionListTest.java @@ -29,17 +29,21 @@ import static org.junit.jupiter.api.Assertions.assertTrue; abstract class PositionListTest { static class Long extends PositionListTest { + @Override protected PositionList createPositionList() { return new LongPositionList(); } + } static class Vector extends PositionListTest { + @Override protected PositionList createPositionList() { return new VectorPositionList(); } + } private final VariedVectorGenerator generator = new VariedVectorGenerator(true); @@ -116,4 +120,5 @@ abstract class PositionListTest { assertEquals(0, positionList.size()); }); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/eventbus/EventBusTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/eventbus/EventBusTest.java index 496956183..1135934ce 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/eventbus/EventBusTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/eventbus/EventBusTest.java @@ -69,4 +69,5 @@ public class EventBusTest { eventBus.post(e2); assertEquals(singletonList(e1), subscriber.events); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/io/file/MorePathsTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/io/file/MorePathsTest.java index 763edb888..40833a2e6 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/io/file/MorePathsTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/io/file/MorePathsTest.java @@ -38,32 +38,33 @@ class MorePathsTest { @Test void testRelative() { assertEquals( - paths("a", "a/b", "a/b/c"), - MorePaths.iterPaths(Paths.get("a/b/c")).collect(toList()) + paths("a", "a/b", "a/b/c"), + MorePaths.iterPaths(Paths.get("a/b/c")).collect(toList()) ); } @Test void testAbsolute() { assertEquals( - paths("/", "/a", "/a/b", "/a/b/c"), - MorePaths.iterPaths(Paths.get("/a/b/c")).collect(toList()) + paths("/", "/a", "/a/b", "/a/b/c"), + MorePaths.iterPaths(Paths.get("/a/b/c")).collect(toList()) ); } @Test void testEmpty() { assertEquals( - paths(""), - MorePaths.iterPaths(Paths.get("")).collect(toList()) + paths(""), + MorePaths.iterPaths(Paths.get("")).collect(toList()) ); } @Test void testJustFile() { assertEquals( - paths("a"), - MorePaths.iterPaths(Paths.get("a")).collect(toList()) + paths("a"), + MorePaths.iterPaths(Paths.get("a")).collect(toList()) ); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/ResourceLockKeys.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/ResourceLockKeys.java index b0eb01de9..c8a028688 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/ResourceLockKeys.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/ResourceLockKeys.java @@ -20,8 +20,10 @@ package com.sk89q.worldedit.util.test; public class ResourceLockKeys { + public static final String WORLDEDIT_PLATFORM = "WORLDEDIT_PLATFORM"; private ResourceLockKeys() { } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorGenerator.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorGenerator.java index 8a4cf7b8d..6f567d41f 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorGenerator.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorGenerator.java @@ -63,7 +63,8 @@ public class VariedVectorGenerator { BlockVector3.at(-maxXZ, -maxY - 1, -maxXZ), BlockVector3.at(maxXZ, -maxY - 1, maxXZ), BlockVector3.at(-maxXZ, maxY, -maxXZ), - BlockVector3.at(maxXZ, maxY, maxXZ)); + BlockVector3.at(maxXZ, maxY, maxXZ) + ); } public Stream makeVectorsStream() { @@ -108,4 +109,5 @@ public class VariedVectorGenerator { } }; } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorPair.java b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorPair.java index 2d55b7b0d..6854c1bee 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorPair.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorPair.java @@ -22,6 +22,7 @@ package com.sk89q.worldedit.util.test; import com.sk89q.worldedit.math.BlockVector3; public class VariedVectorPair { + public final BlockVector3 first; public final BlockVector3 second; @@ -29,4 +30,5 @@ public class VariedVectorPair { this.first = first; this.second = second; } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/EntryMaker.java b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/EntryMaker.java index 5ae6a60ab..3b9fe233c 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/EntryMaker.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/EntryMaker.java @@ -36,6 +36,7 @@ import static com.sk89q.worldedit.world.snapshot.experimental.fs.FileSystemSnaps import static com.sk89q.worldedit.world.snapshot.experimental.fs.FileSystemSnapshotDatabaseTest.REGION_DATA; interface EntryMaker { + EntryMaker TIMESTAMPED_DIR = (directory, time) -> { Path timestampedDir = directory.resolve(time.format(FORMATTER)); Files.createDirectories(timestampedDir); @@ -44,8 +45,8 @@ interface EntryMaker { EntryMaker TIMESTAMPED_ARCHIVE = (directory, time) -> { Path zipFile = directory.resolve(time.format(FORMATTER) + ".zip"); try (FileSystem zipFs = FileSystems.newFileSystem( - URI.create("jar:" + zipFile.toUri() + "!/"), - ImmutableMap.of("create", "true") + URI.create("jar:" + zipFile.toUri() + "!/"), + ImmutableMap.of("create", "true") )) { TIMESTAMPED_DIR.createEntry(zipFs.getPath("/"), time); } @@ -63,6 +64,7 @@ interface EntryMaker { }; class DimInfo { + final String worldName; final int dim; @@ -70,6 +72,7 @@ interface EntryMaker { this.worldName = worldName; this.dim = dim; } + } EntryMaker WORLD_DIM_DIR = (directory, dimInfo) -> { @@ -95,12 +98,12 @@ interface EntryMaker { Files.createDirectories(worldDir); Files.createFile(worldDir.resolve("level.dat")); Path chunkFile = worldDir.resolve(LegacyChunkStore.getFilename( - CHUNK_POS.toBlockVector2(), "/" + CHUNK_POS.toBlockVector2(), "/" )); Files.createDirectories(chunkFile.getParent()); Files.write(chunkFile, CHUNK_DATA); chunkFile = worldDir.resolve(LegacyChunkStore.getFilename( - CHUNK_POS.add(32, 0, 32).toBlockVector2(), "/" + CHUNK_POS.add(32, 0, 32).toBlockVector2(), "/" )); Files.createDirectories(chunkFile.getParent()); Files.write(chunkFile, CHUNK_DATA); @@ -112,8 +115,8 @@ interface EntryMaker { try { Files.deleteIfExists(temp); try (FileSystem zipFs = FileSystems.newFileSystem( - URI.create("jar:" + temp.toUri() + "!/"), - ImmutableMap.of("create", "true") + URI.create("jar:" + temp.toUri() + "!/"), + ImmutableMap.of("create", "true") )) { WORLD_DIR.createEntry(zipFs.getPath("/"), worldName); } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDContext.java b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDContext.java index 2362f2198..36273d7e1 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDContext.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDContext.java @@ -24,13 +24,13 @@ import com.sk89q.worldedit.util.io.file.ArchiveDir; import com.sk89q.worldedit.util.io.file.ArchiveNioSupport; import com.sk89q.worldedit.world.snapshot.experimental.Snapshot; +import javax.annotation.Nullable; import java.io.IOException; import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.stream.Stream; -import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkArgument; import static java.util.stream.Collectors.toList; @@ -75,8 +75,10 @@ class FSSDContext { snapshots = snapshotStream.collect(toList()); } try { - assertTrue(snapshots.size() <= 1, - "Too many snapshots matched for " + worldName); + assertTrue( + snapshots.size() <= 1, + "Too many snapshots matched for " + worldName + ); return requireSnapshot(name, snapshots.stream().findAny().orElse(null)); } catch (Throwable t) { Closer closer = Closer.create(); @@ -99,6 +101,7 @@ class FSSDContext { ArchiveDir getRootOfArchive(Path archive) throws IOException { return archiveNioSupport.tryOpenAsDir(archive) - .orElseThrow(() -> new AssertionError("No archive opener for " + archive)); + .orElseThrow(() -> new AssertionError("No archive opener for " + archive)); } + } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDTestType.java b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDTestType.java index fb3600c9b..215f278fb 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDTestType.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDTestType.java @@ -54,10 +54,14 @@ enum FSSDTestType { @Override List getTests(FSSDContext context) { return ImmutableList.of( - dynamicTest("return an empty stream from getSnapshots(worldName)", - () -> context.db.getSnapshots(WORLD_ALPHA)), - dynamicTest("return an empty optional from getSnapshot(name)", - () -> context.db.getSnapshot(context.nameUri(WORLD_ALPHA))) + dynamicTest( + "return an empty stream from getSnapshots(worldName)", + () -> context.db.getSnapshots(WORLD_ALPHA) + ), + dynamicTest( + "return an empty optional from getSnapshot(name)", + () -> context.db.getSnapshot(context.nameUri(WORLD_ALPHA)) + ) ); } }, @@ -74,7 +78,7 @@ enum FSSDTestType { List getTests(FSSDContext context) throws IOException { int dim = ThreadLocalRandom.current().nextInt(); Path worldFolder = EntryMaker.WORLD_DIM_DIR - .createEntry(context.db.getRoot(), new EntryMaker.DimInfo(WORLD_ALPHA, dim)); + .createEntry(context.db.getRoot(), new EntryMaker.DimInfo(WORLD_ALPHA, dim)); Files.setLastModifiedTime(worldFolder, FileTime.from(TIME_ONE.toInstant())); return singleSnapTest(context, WORLD_ALPHA, TIME_ONE); } @@ -83,7 +87,7 @@ enum FSSDTestType { @Override List getTests(FSSDContext context) throws IOException { Path worldFolder = EntryMaker.WORLD_NO_REGION_DIR - .createEntry(context.db.getRoot(), WORLD_ALPHA); + .createEntry(context.db.getRoot(), WORLD_ALPHA); Files.setLastModifiedTime(worldFolder, FileTime.from(TIME_ONE.toInstant())); return singleSnapTest(context, WORLD_ALPHA, TIME_ONE); } @@ -92,7 +96,7 @@ enum FSSDTestType { @Override List getTests(FSSDContext context) throws IOException { Path worldFolder = EntryMaker.WORLD_LEGACY_DIR - .createEntry(context.db.getRoot(), WORLD_ALPHA); + .createEntry(context.db.getRoot(), WORLD_ALPHA); Files.setLastModifiedTime(worldFolder, FileTime.from(TIME_ONE.toInstant())); return singleSnapTest(context, WORLD_ALPHA, TIME_ONE); } @@ -101,11 +105,11 @@ enum FSSDTestType { @Override List getTests(FSSDContext context) throws IOException { Path worldArchive = EntryMaker.WORLD_ARCHIVE - .createEntry(context.db.getRoot(), WORLD_ALPHA); + .createEntry(context.db.getRoot(), WORLD_ALPHA); try (ArchiveDir rootOfArchive = context.getRootOfArchive(worldArchive)) { Files.setLastModifiedTime( - rootOfArchive.getPath(), - FileTime.from(TIME_ONE.toInstant()) + rootOfArchive.getPath(), + FileTime.from(TIME_ONE.toInstant()) ); } return singleSnapTest(context, WORLD_ALPHA + ".zip", TIME_ONE); @@ -116,20 +120,26 @@ enum FSSDTestType { List getTests(FSSDContext context) throws IOException { Path root = context.db.getRoot(); Path timestampedDir = EntryMaker.TIMESTAMPED_DIR - .createEntry(root, TIME_ONE); + .createEntry(root, TIME_ONE); EntryMaker.WORLD_DIR.createEntry(timestampedDir, WORLD_ALPHA); EntryMaker.WORLD_ARCHIVE.createEntry(timestampedDir, WORLD_BETA); return ImmutableList.of( - dynamicContainer("world dir", - singleSnapTest(context, - root.relativize(timestampedDir) + File.separator + WORLD_ALPHA, - TIME_ONE) - ), - dynamicContainer("world archive", - singleSnapTest(context, - root.relativize(timestampedDir) + File.separator + WORLD_BETA + ".zip", - TIME_ONE) - ) + dynamicContainer( + "world dir", + singleSnapTest( + context, + root.relativize(timestampedDir) + File.separator + WORLD_ALPHA, + TIME_ONE + ) + ), + dynamicContainer( + "world archive", + singleSnapTest( + context, + root.relativize(timestampedDir) + File.separator + WORLD_BETA + ".zip", + TIME_ONE + ) + ) ); } }, @@ -138,17 +148,20 @@ enum FSSDTestType { List getTests(FSSDContext context) throws IOException { Path root = context.db.getRoot(); Path timestampedArchive = EntryMaker.TIMESTAMPED_ARCHIVE - .createEntry(root, TIME_ONE); + .createEntry(root, TIME_ONE); try (ArchiveDir timestampedDir = context.getRootOfArchive(timestampedArchive)) { EntryMaker.WORLD_DIR.createEntry(timestampedDir.getPath(), WORLD_ALPHA); EntryMaker.WORLD_ARCHIVE.createEntry(timestampedDir.getPath(), WORLD_BETA); } return ImmutableList.of( - dynamicContainer("world dir", - singleSnapTest(context, - root.relativize(timestampedArchive) + File.separator + WORLD_ALPHA, - TIME_ONE) - ) + dynamicContainer( + "world dir", + singleSnapTest( + context, + root.relativize(timestampedArchive) + File.separator + WORLD_ALPHA, + TIME_ONE + ) + ) ); } }, @@ -157,22 +170,28 @@ enum FSSDTestType { List getTests(FSSDContext context) throws IOException { Path root = context.db.getRoot(); Path timestampedDirA = EntryMaker.TIMESTAMPED_DIR - .createEntry(root.resolve(WORLD_ALPHA), TIME_ONE); + .createEntry(root.resolve(WORLD_ALPHA), TIME_ONE); Path timestampedDirB = EntryMaker.TIMESTAMPED_DIR - .createEntry(root.resolve(WORLD_BETA), TIME_ONE); + .createEntry(root.resolve(WORLD_BETA), TIME_ONE); EntryMaker.WORLD_DIR.createEntry(timestampedDirA, WORLD_ALPHA); EntryMaker.WORLD_ARCHIVE.createEntry(timestampedDirB, WORLD_BETA); return ImmutableList.of( - dynamicContainer("world dir", - singleSnapTest(context, - root.relativize(timestampedDirA) + File.separator + WORLD_ALPHA, - TIME_ONE) - ), - dynamicContainer("world archive", - singleSnapTest(context, - root.relativize(timestampedDirB) + File.separator + WORLD_BETA + ".zip", - TIME_ONE) - ) + dynamicContainer( + "world dir", + singleSnapTest( + context, + root.relativize(timestampedDirA) + File.separator + WORLD_ALPHA, + TIME_ONE + ) + ), + dynamicContainer( + "world archive", + singleSnapTest( + context, + root.relativize(timestampedDirB) + File.separator + WORLD_BETA + ".zip", + TIME_ONE + ) + ) ); } }, @@ -181,57 +200,57 @@ enum FSSDTestType { List getTests(FSSDContext context) throws IOException { Path root = context.db.getRoot(); Path timestampedDirA = EntryMaker.TIMESTAMPED_DIR - .createEntry(root, TIME_ONE); + .createEntry(root, TIME_ONE); EntryMaker.WORLD_DIR.createEntry(timestampedDirA, WORLD_ALPHA); Path timestampedDirB = EntryMaker.TIMESTAMPED_DIR - .createEntry(root, TIME_TWO); + .createEntry(root, TIME_TWO); EntryMaker.WORLD_DIR.createEntry(timestampedDirB, WORLD_ALPHA); return ImmutableList.of( - dynamicTest("list both snapshots in order (newest first)", () -> { - List snapshots = context.db - .getSnapshotsNewestFirst(WORLD_ALPHA).collect(toList()); - assertEquals(2, snapshots.size()); - assertValidSnapshot(TIME_ONE, snapshots.get(0)); - assertValidSnapshot(TIME_TWO, snapshots.get(1)); - }), - dynamicTest("list both snapshots in order (oldest first)", () -> { - List snapshots = context.db - .getSnapshotsOldestFirst(WORLD_ALPHA).collect(toList()); - assertEquals(2, snapshots.size()); - assertValidSnapshot(TIME_TWO, snapshots.get(0)); - assertValidSnapshot(TIME_ONE, snapshots.get(1)); - }), - dynamicTest("list only 1 if getting AFTER 2", () -> { - List snapshots = context.db - .getSnapshotsAfter(WORLD_ALPHA, TIME_TWO).collect(toList()); - assertEquals(1, snapshots.size()); - assertValidSnapshot(TIME_ONE, snapshots.get(0)); - }), - dynamicTest("list only 2 if getting BEFORE 1", () -> { - List snapshots = context.db - .getSnapshotsBefore(WORLD_ALPHA, TIME_ONE).collect(toList()); - assertEquals(1, snapshots.size()); - assertValidSnapshot(TIME_TWO, snapshots.get(0)); - }), - dynamicTest("list both if AFTER time before 2", () -> { - List snapshots = context.db - .getSnapshotsAfter(WORLD_ALPHA, TIME_TWO.minusSeconds(1)) - .collect(toList()); - assertEquals(2, snapshots.size()); - // sorted newest first - assertValidSnapshot(TIME_ONE, snapshots.get(0)); - assertValidSnapshot(TIME_TWO, snapshots.get(1)); - }), - dynamicTest("list both if BEFORE time after 1", () -> { + dynamicTest("list both snapshots in order (newest first)", () -> { List snapshots = context.db - .getSnapshotsBefore(WORLD_ALPHA, TIME_ONE.plusSeconds(1)) - .collect(toList()); + .getSnapshotsNewestFirst(WORLD_ALPHA).collect(toList()); + assertEquals(2, snapshots.size()); + assertValidSnapshot(TIME_ONE, snapshots.get(0)); + assertValidSnapshot(TIME_TWO, snapshots.get(1)); + }), + dynamicTest("list both snapshots in order (oldest first)", () -> { + List snapshots = context.db + .getSnapshotsOldestFirst(WORLD_ALPHA).collect(toList()); assertEquals(2, snapshots.size()); - // sorted oldest first assertValidSnapshot(TIME_TWO, snapshots.get(0)); assertValidSnapshot(TIME_ONE, snapshots.get(1)); - } - ) + }), + dynamicTest("list only 1 if getting AFTER 2", () -> { + List snapshots = context.db + .getSnapshotsAfter(WORLD_ALPHA, TIME_TWO).collect(toList()); + assertEquals(1, snapshots.size()); + assertValidSnapshot(TIME_ONE, snapshots.get(0)); + }), + dynamicTest("list only 2 if getting BEFORE 1", () -> { + List snapshots = context.db + .getSnapshotsBefore(WORLD_ALPHA, TIME_ONE).collect(toList()); + assertEquals(1, snapshots.size()); + assertValidSnapshot(TIME_TWO, snapshots.get(0)); + }), + dynamicTest("list both if AFTER time before 2", () -> { + List snapshots = context.db + .getSnapshotsAfter(WORLD_ALPHA, TIME_TWO.minusSeconds(1)) + .collect(toList()); + assertEquals(2, snapshots.size()); + // sorted newest first + assertValidSnapshot(TIME_ONE, snapshots.get(0)); + assertValidSnapshot(TIME_TWO, snapshots.get(1)); + }), + dynamicTest("list both if BEFORE time after 1", () -> { + List snapshots = context.db + .getSnapshotsBefore(WORLD_ALPHA, TIME_ONE.plusSeconds(1)) + .collect(toList()); + assertEquals(2, snapshots.size()); + // sorted oldest first + assertValidSnapshot(TIME_TWO, snapshots.get(0)); + assertValidSnapshot(TIME_ONE, snapshots.get(1)); + } + ) ); } }, @@ -239,36 +258,40 @@ enum FSSDTestType { @Override List getTests(FSSDContext context) throws IOException { Path worldFolderA = EntryMaker.WORLD_DIR - .createEntry(context.db.getRoot(), WORLD_ALPHA); + .createEntry(context.db.getRoot(), WORLD_ALPHA); Files.setLastModifiedTime(worldFolderA, FileTime.from(TIME_ONE.toInstant())); Path worldFolderB = EntryMaker.WORLD_DIR - .createEntry(context.db.getRoot(), WORLD_BETA); + .createEntry(context.db.getRoot(), WORLD_BETA); Files.setLastModifiedTime(worldFolderB, FileTime.from(TIME_TWO.toInstant())); return Stream.of( - singleSnapTest(context, WORLD_ALPHA, TIME_ONE), - singleSnapTest(context, WORLD_BETA, TIME_TWO) + singleSnapTest(context, WORLD_ALPHA, TIME_ONE), + singleSnapTest(context, WORLD_BETA, TIME_TWO) ).flatMap(List::stream).collect(toList()); } }; - List singleSnapTest(FSSDContext context, String name, - ZonedDateTime time) { + List singleSnapTest( + FSSDContext context, String name, + ZonedDateTime time + ) { return ImmutableList.of( - dynamicTest("return a valid snapshot for " + name, () -> { - try (Snapshot snapshot = context.requireSnapshot(name)) { - assertValidSnapshot(time, snapshot); - } - }), - dynamicTest("list a valid snapshot for " + name, () -> { - try (Snapshot snapshot = context.requireListsSnapshot(name)) { - assertValidSnapshot(time, snapshot); - } - }) + dynamicTest("return a valid snapshot for " + name, () -> { + try (Snapshot snapshot = context.requireSnapshot(name)) { + assertValidSnapshot(time, snapshot); + } + }), + dynamicTest("list a valid snapshot for " + name, () -> { + try (Snapshot snapshot = context.requireListsSnapshot(name)) { + assertValidSnapshot(time, snapshot); + } + }) ); } - private static void assertValidSnapshot(ZonedDateTime time, - Snapshot snapshot) throws IOException, DataException { + private static void assertValidSnapshot( + ZonedDateTime time, + Snapshot snapshot + ) throws IOException, DataException { assertEquals(time, snapshot.getInfo().getDateTime()); // MCA file assertEquals(CHUNK_TAG.toString(), snapshot.getChunkTag(CHUNK_POS).toString()); @@ -281,10 +304,10 @@ enum FSSDTestType { Stream getNamedTests(FSSDContext context) throws IOException { return Stream.of(dynamicContainer( - name(), - URI.create("method:" + getClass().getName() + - "#getTests(" + FSSDContext.class.getName() + ")"), - getTests(context).stream() + name(), + URI.create("method:" + getClass().getName() + + "#getTests(" + FSSDContext.class.getName() + ")"), + getTests(context).stream() )); } diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java index a89994864..fa50e67a2 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java @@ -71,9 +71,9 @@ class FileSystemSnapshotDatabaseTest { static final String WORLD_BETA = "World Beta"; static final DateTimeFormatter FORMATTER = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH_mm_ss"); + DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH_mm_ss"); static final ZonedDateTime TIME_ONE = Instant.parse("2018-01-01T12:00:00.00Z") - .atZone(ZoneId.systemDefault()); + .atZone(ZoneId.systemDefault()); static final ZonedDateTime TIME_TWO = TIME_ONE.minusDays(1); private static Path TEMP_DIR; @@ -88,11 +88,11 @@ class FileSystemSnapshotDatabaseTest { try { // Find the single chunk BlockVector2 chunkPos = IntStream.range(0, 32).mapToObj( - x -> IntStream.range(0, 32).filter(z -> reader.hasChunk(x, z)) - .mapToObj(z -> BlockVector2.at(x, z)) - ).flatMap(Function.identity()) - .findAny() - .orElseThrow(() -> new AssertionError("No chunk in region file.")); + x -> IntStream.range(0, 32).filter(z -> reader.hasChunk(x, z)) + .mapToObj(z -> BlockVector2.at(x, z)) + ).flatMap(Function.identity()) + .findAny() + .orElseThrow(() -> new AssertionError("No chunk in region file.")); ByteArrayOutputStream cap = new ByteArrayOutputStream(); try (InputStream in = reader.getChunkInputStream(chunkPos); GZIPOutputStream gzOut = new GZIPOutputStream(cap)) { @@ -100,7 +100,7 @@ class FileSystemSnapshotDatabaseTest { } CHUNK_DATA = cap.toByteArray(); CHUNK_TAG = ChunkStoreHelper.readCompoundTag(() -> new GZIPInputStream( - new ByteArrayInputStream(CHUNK_DATA) + new ByteArrayInputStream(CHUNK_DATA) )); CHUNK_POS = chunkPos.toBlockVector3(); } finally { @@ -142,14 +142,18 @@ class FileSystemSnapshotDatabaseTest { try { Path relative = root.getFileSystem().getPath("relative"); Files.createDirectories(relative); - FileSystemSnapshotDatabase db2 = new FileSystemSnapshotDatabase(relative, - ArchiveNioSupports.combined()); + FileSystemSnapshotDatabase db2 = new FileSystemSnapshotDatabase( + relative, + ArchiveNioSupports.combined() + ); assertEquals(root.getFileSystem().getPath(".").toRealPath() - .resolve(relative), db2.getRoot()); + .resolve(relative), db2.getRoot()); Path absolute = root.resolve("absolute"); Files.createDirectories(absolute); - FileSystemSnapshotDatabase db3 = new FileSystemSnapshotDatabase(absolute, - ArchiveNioSupports.combined()); + FileSystemSnapshotDatabase db3 = new FileSystemSnapshotDatabase( + absolute, + ArchiveNioSupports.combined() + ); assertEquals(absolute, db3.getRoot()); } finally { deleteTree(root); @@ -160,26 +164,28 @@ class FileSystemSnapshotDatabaseTest { @TestFactory Stream withSpecificNioSupport() { return Stream.of( - ZipArchiveNioSupport.getInstance() - ) - .map(nioSupport -> { - Stream nodes = Stream.of(FSSDTestType.values()) - .flatMap(type -> { - try { - return getTests(nioSupport, type); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - }); - return dynamicContainer( - nioSupport.getClass().getSimpleName() + ", can, for format:", - nodes - ); - }); + ZipArchiveNioSupport.getInstance() + ) + .map(nioSupport -> { + Stream nodes = Stream.of(FSSDTestType.values()) + .flatMap(type -> { + try { + return getTests(nioSupport, type); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }); + return dynamicContainer( + nioSupport.getClass().getSimpleName() + ", can, for format:", + nodes + ); + }); } - private static Stream getTests(ArchiveNioSupport nioSupport, - FSSDTestType type) throws IOException { + private static Stream getTests( + ArchiveNioSupport nioSupport, + FSSDTestType type + ) throws IOException { Path root = newTempDb(); try { Path dbRoot = root.resolve("snapshots");