From c0fa1602ad1a1c6d32f50f87d372548c13cc9666 Mon Sep 17 00:00:00 2001 From: Byron Marohn Date: Thu, 20 Dec 2018 08:00:27 -0800 Subject: [PATCH] Restore the formatting of many things to upstream WorldEdit - no code changes This patch touches many files but changes absolutely no functionality. The goal here is to make future merges with worldedit produce fewer conflicts that have to be resolved. This patch was made by painstakingly diff'ing files and copying changes over from the last upstream merge commit (02c6f11b) into this codebase. Signed-off-by: Byron Marohn --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../util/FallbackRegistrationListener.java | 3 +- .../ConfigurationPermissionsResolver.java | 8 +- .../sk89q/wepif/NijiPermissionsResolver.java | 2 +- .../wepif/PermissionsResolverManager.java | 2 +- .../worldedit/bukkit/BukkitBiomeRegistry.java | 3 +- .../bukkit/BukkitCommandInspector.java | 4 +- .../sk89q/worldedit/bukkit/BukkitEntity.java | 5 +- .../bukkit/BukkitEntityProperties.java | 4 +- .../bukkit/BukkitPlayerBlockBag.java | 6 +- .../sk89q/wepif/DinnerPermsResolverTest.java | 8 +- .../sk89q/wepif/TestOfflinePermissible.java | 6 +- .../worldedit/blocks/MobSpawnerBlock.java | 2 +- .../com/sk89q/worldedit/blocks/SignBlock.java | 4 +- .../sk89q/worldedit/blocks/SkullBlock.java | 4 +- .../main/java/com/sk89q/jnbt/CompoundTag.java | 22 +- .../com/sk89q/jnbt/CompoundTagBuilder.java | 21 +- .../src/main/java/com/sk89q/jnbt/ListTag.java | 9 +- .../java/com/sk89q/jnbt/ListTagBuilder.java | 4 +- .../java/com/sk89q/jnbt/LongArrayTag.java | 10 +- .../java/com/sk89q/jnbt/NBTInputStream.java | 13 +- .../java/com/sk89q/jnbt/NBTOutputStream.java | 200 ++++++++++-------- .../main/java/com/sk89q/jnbt/NBTUtils.java | 4 +- .../src/main/java/com/sk89q/jnbt/Tag.java | 6 +- .../util/commands/CommandException.java | 5 +- .../java/com/sk89q/util/ReflectionUtil.java | 4 +- .../main/java/com/sk89q/util/StringUtil.java | 18 +- .../java/com/sk89q/util/yaml/YAMLNode.java | 3 +- .../com/sk89q/util/yaml/YAMLProcessor.java | 11 +- .../java/com/sk89q/worldedit/EditSession.java | 141 ++++++------ .../sk89q/worldedit/EditSessionFactory.java | 4 +- .../sk89q/worldedit/LocalConfiguration.java | 2 +- .../com/sk89q/worldedit/LocalSession.java | 14 +- .../com/sk89q/worldedit/PlayerDirection.java | 2 +- .../main/java/com/sk89q/worldedit/Vector.java | 31 +-- .../java/com/sk89q/worldedit/Vector2D.java | 22 +- .../java/com/sk89q/worldedit/WorldEdit.java | 7 +- .../sk89q/worldedit/blocks/ClothColor.java | 7 +- .../command/argument/ItemParser.java | 2 +- .../command/argument/ReplaceParser.java | 6 +- .../command/composition/ApplyCommand.java | 4 +- .../composition/ShapedBrushCommand.java | 5 +- .../worldedit/command/tool/DistanceWand.java | 3 +- .../worldedit/command/tool/QueryTool.java | 2 +- .../command/tool/brush/CylinderBrush.java | 2 +- .../tool/brush/HollowCylinderBrush.java | 4 +- .../command/tool/brush/HollowSphereBrush.java | 4 +- .../command/tool/brush/SmoothBrush.java | 4 +- .../command/tool/brush/SphereBrush.java | 3 +- .../worldedit/command/util/EntityRemover.java | 4 +- .../sk89q/worldedit/entity/BaseEntity.java | 6 +- .../event/platform/BlockInteractEvent.java | 4 +- .../platform/CommandSuggestionEvent.java | 4 +- .../platform/ConfigurationLoadEvent.java | 4 +- .../event/platform/PlayerInputEvent.java | 4 +- .../extension/factory/BlockFactory.java | 9 +- .../extension/factory/MaskFactory.java | 1 + .../extension/factory/PatternFactory.java | 1 + .../factory/RandomPatternParser.java | 5 +- .../factory/SingleBlockPatternParser.java | 2 +- .../worldedit/extension/platform/Actor.java | 1 - .../extension/platform/Platform.java | 3 +- .../sk89q/worldedit/extent/OutputExtent.java | 7 +- .../extent/buffer/ForgetfulExtentBuffer.java | 5 +- .../extent/cache/LastAccessExtentCache.java | 2 +- .../extent/clipboard/StoredEntity.java | 4 +- .../extent/clipboard/io/ClipboardReader.java | 1 - .../clipboard/io/NBTSchematicReader.java | 2 +- .../legacycompat/NBTCompatibilityHandler.java | 2 - .../SignCompatibilityHandler.java | 2 - .../extent/reorder/MultiStageReorder.java | 2 +- .../extent/validation/BlockChangeLimiter.java | 7 +- .../validation/DataValidatorExtent.java | 9 +- .../extent/world/BlockQuirkExtent.java | 7 +- .../extent/world/ChunkLoadingExtent.java | 7 +- .../extent/world/FastModeExtent.java | 7 +- .../sk89q/worldedit/function/EditContext.java | 4 +- .../function/FlatRegionMaskingFilter.java | 4 +- .../worldedit/function/GroundFunction.java | 8 +- .../function/RegionMaskingFilter.java | 4 +- .../function/biome/BiomeReplace.java | 4 +- .../worldedit/function/factory/Apply.java | 6 +- .../worldedit/function/factory/Deform.java | 6 +- .../function/generator/FloraGenerator.java | 4 +- .../function/generator/ForestGenerator.java | 4 +- .../generator/GardenPatchGenerator.java | 2 +- .../function/mask/AbstractExtentMask.java | 2 +- .../worldedit/function/mask/BiomeMask2D.java | 4 +- .../function/mask/BoundedHeightMask.java | 4 +- .../function/mask/ExistingBlockMask.java | 2 +- .../function/mask/ExpressionMask.java | 4 +- .../function/mask/ExpressionMask2D.java | 4 +- .../function/mask/MaskIntersection2D.java | 4 +- .../worldedit/function/mask/NoiseFilter.java | 6 +- .../function/mask/NoiseFilter2D.java | 6 +- .../worldedit/function/mask/OffsetMask2D.java | 4 +- .../worldedit/function/mask/RegionMask.java | 4 +- .../function/operation/DelegateOperation.java | 4 +- .../function/operation/OperationQueue.java | 4 +- .../function/util/FlatRegionOffset.java | 4 +- .../worldedit/function/util/RegionOffset.java | 4 +- .../worldedit/history/change/BlockChange.java | 7 +- .../worldedit/history/change/Change.java | 2 +- .../command/CommandLoggingHandler.java | 9 +- .../command/UserCommandCompleter.java | 4 +- .../expression/parser/ParserProcessors.java | 6 +- .../runtime/ExpressionEnvironment.java | 4 - .../expression/runtime/SimpleFor.java | 1 + .../internal/expression/runtime/While.java | 1 + .../internal/registry/AbstractFactory.java | 6 +- .../internal/registry/InputParser.java | 2 +- .../interpolation/LinearInterpolation.java | 4 +- .../ReparametrisingInterpolation.java | 4 +- .../math/transform/CombinedTransform.java | 4 +- .../worldedit/math/transform/Transforms.java | 4 +- .../worldedit/regions/TransformRegion.java | 5 +- .../iterator/FlatRegion3DIterator.java | 4 +- .../regions/iterator/FlatRegionIterator.java | 4 +- .../regions/iterator/RegionIterator.java | 4 +- .../worldedit/regions/polyhedron/Edge.java | 4 +- .../regions/polyhedron/Triangle.java | 4 +- .../ExtendingCuboidRegionSelector.java | 1 + .../selector/SphereRegionSelector.java | 1 + .../regions/shape/ArbitraryShape.java | 5 +- .../worldedit/regions/shape/RegionShape.java | 3 +- .../scripting/CraftScriptEngine.java | 1 + .../scripting/RhinoCraftScriptEngine.java | 7 +- .../java/RhinoScriptEngineFactory.java | 1 + .../session/request/RequestSelection.java | 7 +- .../session/storage/JsonFileSessionStore.java | 4 +- .../java/com/sk89q/worldedit/util/Enums.java | 4 +- .../sk89q/worldedit/util/FileDialogUtil.java | 5 +- .../com/sk89q/worldedit/util/GuavaUtil.java | 4 +- .../sk89q/worldedit/util/TreeGenerator.java | 2 +- .../util/collection/DoubleArrayList.java | 4 +- .../util/collection/FastListIterator.java | 6 +- .../worldedit/util/command/Dispatcher.java | 3 +- .../util/command/InvalidUsageException.java | 4 +- .../util/command/PrimaryAliasComparator.java | 3 +- .../command/binding/PrimitiveBindings.java | 8 +- .../util/command/composition/FlagParser.java | 5 +- .../worldedit/util/eventbus/EventHandler.java | 4 +- .../util/eventbus/HierarchyCache.java | 6 +- .../util/eventbus/MethodEventHandler.java | 4 +- .../worldedit/util/eventbus/Subscribe.java | 6 +- .../worldedit/util/formatting/Fragment.java | 5 +- .../worldedit/util/formatting/Style.java | 6 +- .../util/function/LevenshteinDistance.java | 5 +- .../com/sk89q/worldedit/util/io/Closer.java | 4 +- .../worldedit/util/logging/LogFormat.java | 4 +- .../java/com/sk89q/worldedit/world/World.java | 5 +- .../worldedit/world/biome/BaseBiome.java | 3 - .../worldedit/world/biome/BiomeName.java | 4 +- .../sk89q/worldedit/world/chunk/Chunk.java | 1 + .../world/registry/BiomeRegistry.java | 4 +- .../world/registry/BundledBlockRegistry.java | 3 +- .../world/registry/NullBiomeRegistry.java | 3 +- .../worldedit/world/snapshot/Snapshot.java | 9 +- .../world/snapshot/SnapshotDateParser.java | 3 +- .../world/snapshot/SnapshotRepository.java | 3 +- .../world/snapshot/SnapshotRestore.java | 5 +- .../world/storage/LegacyChunkStore.java | 2 +- .../world/storage/NBTConversions.java | 4 +- .../world/storage/ZippedLegacyChunkStore.java | 2 +- .../storage/ZippedMcRegionChunkStore.java | 2 +- .../java/com/sk89q/worldedit/VectorTest.java | 6 +- .../sk89q/worldedit/util/LocationTest.java | 6 +- 167 files changed, 616 insertions(+), 534 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9ebf67f22..9b69b3197 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Jul 26 14:29:48 AEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip diff --git a/worldedit-bukkit/src/main/java/com/sk89q/bukkit/util/FallbackRegistrationListener.java b/worldedit-bukkit/src/main/java/com/sk89q/bukkit/util/FallbackRegistrationListener.java index fc797bfc4..035318341 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/bukkit/util/FallbackRegistrationListener.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/bukkit/util/FallbackRegistrationListener.java @@ -38,4 +38,5 @@ public class FallbackRegistrationListener implements Listener { event.setCancelled(true); } } -} \ No newline at end of file + +} diff --git a/worldedit-bukkit/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java b/worldedit-bukkit/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java index b309265d6..d61674c1e 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/wepif/ConfigurationPermissionsResolver.java @@ -19,16 +19,16 @@ package com.sk89q.wepif; +import com.sk89q.util.yaml.YAMLNode; +import com.sk89q.util.yaml.YAMLProcessor; +import org.bukkit.OfflinePlayer; + import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import com.sk89q.util.yaml.YAMLNode; -import com.sk89q.util.yaml.YAMLProcessor; -import org.bukkit.OfflinePlayer; - public class ConfigurationPermissionsResolver implements PermissionsResolver { private YAMLProcessor config; private Map> userPermissionsCache; diff --git a/worldedit-bukkit/src/main/java/com/sk89q/wepif/NijiPermissionsResolver.java b/worldedit-bukkit/src/main/java/com/sk89q/wepif/NijiPermissionsResolver.java index 182a29faf..fe23bfa46 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/wepif/NijiPermissionsResolver.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/wepif/NijiPermissionsResolver.java @@ -19,6 +19,7 @@ package com.sk89q.wepif; +import com.nijikokun.bukkit.Permissions.Permissions; import com.sk89q.util.yaml.YAMLProcessor; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; @@ -27,7 +28,6 @@ import org.bukkit.command.PluginCommand; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; -import com.nijikokun.bukkit.Permissions.Permissions; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolverManager.java b/worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolverManager.java index 27091ad84..01f04546b 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolverManager.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolverManager.java @@ -21,7 +21,6 @@ package com.sk89q.wepif; import com.sk89q.util.yaml.YAMLFormat; import com.sk89q.util.yaml.YAMLProcessor; -import com.sk89q.worldedit.world.registry.LegacyMapper; import org.bukkit.OfflinePlayer; import org.bukkit.Server; import org.bukkit.event.EventHandler; @@ -103,6 +102,7 @@ public class PermissionsResolverManager implements PermissionsResolver { protected PermissionsResolverManager(Plugin plugin) { this.server = plugin.getServer(); (new ServerListener()).register(plugin); // Register the events + loadConfig(new File("wepif.yml")); findResolver(); } diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBiomeRegistry.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBiomeRegistry.java index 8a69eaf31..cb0fea4de 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBiomeRegistry.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBiomeRegistry.java @@ -25,11 +25,12 @@ import com.sk89q.worldedit.world.biome.BiomeData; import com.sk89q.worldedit.world.registry.BiomeRegistry; import org.bukkit.block.Biome; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import javax.annotation.Nullable; + /** * A biome registry for Bukkit. */ diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java index 8f4b8e5ae..b392c50ac 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.bukkit; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.bukkit.util.CommandInspector; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.extension.platform.Actor; @@ -30,8 +32,6 @@ import org.bukkit.command.CommandSender; import java.util.logging.Logger; -import static com.google.common.base.Preconditions.checkNotNull; - class BukkitCommandInspector implements CommandInspector { private static final Logger logger = Logger.getLogger(BukkitCommandInspector.class.getCanonicalName()); diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntity.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntity.java index 0f94a160a..595a7fc9c 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntity.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntity.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.bukkit; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; @@ -28,10 +30,9 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.NullWorld; -import javax.annotation.Nullable; import java.lang.ref.WeakReference; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; /** * An adapter to adapt a Bukkit entity into a WorldEdit one. diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntityProperties.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntityProperties.java index 02521e87b..fd40f0203 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntityProperties.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitEntityProperties.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.bukkit; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.entity.metadata.EntityProperties; import org.bukkit.entity.Ambient; import org.bukkit.entity.Animals; @@ -42,8 +44,6 @@ import org.bukkit.entity.Tameable; import org.bukkit.entity.Villager; import org.bukkit.entity.minecart.ExplosiveMinecart; -import static com.google.common.base.Preconditions.checkNotNull; - class BukkitEntityProperties implements EntityProperties { private final Entity entity; diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java index e69eabe5f..925fa3893 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayerBlockBag.java @@ -21,7 +21,11 @@ package com.sk89q.worldedit.bukkit; import com.sk89q.worldedit.blocks.BaseItem; import com.sk89q.worldedit.blocks.BaseItemStack; -import com.sk89q.worldedit.extent.inventory.*; +import com.sk89q.worldedit.extent.inventory.BlockBag; +import com.sk89q.worldedit.extent.inventory.BlockBagException; +import com.sk89q.worldedit.extent.inventory.OutOfBlocksException; +import com.sk89q.worldedit.extent.inventory.OutOfSpaceException; +import com.sk89q.worldedit.extent.inventory.SlottableBlockBag; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.block.BlockState; import org.bukkit.entity.Player; diff --git a/worldedit-bukkit/src/test/java/com/sk89q/wepif/DinnerPermsResolverTest.java b/worldedit-bukkit/src/test/java/com/sk89q/wepif/DinnerPermsResolverTest.java index 8e80a57bc..e207e7b8d 100644 --- a/worldedit-bukkit/src/test/java/com/sk89q/wepif/DinnerPermsResolverTest.java +++ b/worldedit-bukkit/src/test/java/com/sk89q/wepif/DinnerPermsResolverTest.java @@ -19,13 +19,15 @@ package com.sk89q.wepif; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + import org.bukkit.Server; import org.bukkit.plugin.PluginManager; import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.*; - -import static org.mockito.Mockito.*; public class DinnerPermsResolverTest { private DinnerPermsResolver resolver; diff --git a/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java b/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java index a67351cd5..21c83228f 100644 --- a/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java +++ b/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java @@ -28,7 +28,11 @@ import org.bukkit.permissions.PermissionAttachment; import org.bukkit.permissions.PermissionAttachmentInfo; import org.bukkit.plugin.Plugin; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; public class TestOfflinePermissible implements OfflinePlayer, Permissible { private boolean op; diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java index 0e4690a1b..6bc58a39c 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java @@ -25,8 +25,8 @@ import com.sk89q.jnbt.NBTUtils; import com.sk89q.jnbt.ShortTag; import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.Tag; +import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.storage.InvalidFormatException; import java.util.HashMap; diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java index 8855c3491..fddd784de 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SignBlock.java @@ -22,9 +22,9 @@ package com.sk89q.worldedit.blocks; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.Tag; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.util.gson.GsonUtil; +import com.sk89q.worldedit.world.block.BaseBlock; +import com.sk89q.worldedit.world.block.BlockState; import java.util.HashMap; import java.util.Map; diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java index 338ca103f..e65ab3ec1 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/SkullBlock.java @@ -22,8 +22,8 @@ package com.sk89q.worldedit.blocks; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.Tag; +import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; import java.util.HashMap; import java.util.Map; @@ -114,4 +114,4 @@ public class SkullBlock extends BaseBlock { owner = ((StringTag) t).getValue(); } } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTag.java b/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTag.java index 6faf8f326..da642d4db 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTag.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTag.java @@ -1,6 +1,24 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + package com.sk89q.jnbt; -import com.sk89q.worldedit.function.entity.ExtentEntityCopy; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -12,6 +30,7 @@ import java.util.Map; public final class CompoundTag extends Tag { private final Map value; + /** * Creates the tag with an empty name. * @@ -425,5 +444,4 @@ public final class CompoundTag extends Tag { return bldr.toString(); } - } \ No newline at end of file diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTagBuilder.java b/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTagBuilder.java index fad4adc44..1799993bb 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTagBuilder.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/CompoundTagBuilder.java @@ -19,11 +19,11 @@ package com.sk89q.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.HashMap; import java.util.Map; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Helps create compound tags. */ @@ -145,14 +145,14 @@ public class CompoundTagBuilder { return put(key, new LongArrayTag(value)); } - /** - * Put the given key and value into the compound tag as a - * {@code LongTag}. - * - * @param key they key - * @param value the value - * @return this object - */ + /** + * Put the given key and value into the compound tag as a + * {@code LongTag}. + * + * @param key they key + * @param value the value + * @return this object + */ public CompoundTagBuilder putLong(String key, long value) { return put(key, new LongTag(value)); } @@ -213,5 +213,4 @@ public class CompoundTagBuilder { return new CompoundTagBuilder(); } - } \ No newline at end of file diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/ListTag.java b/worldedit-core/src/main/java/com/sk89q/jnbt/ListTag.java index c708b21fa..e9f92b99a 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/ListTag.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/ListTag.java @@ -1,12 +1,13 @@ package com.sk89q.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.ArrayList; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; /** * The {@code TAG_List} tag. @@ -64,7 +65,7 @@ public final class ListTag extends Tag { /** * Get the tag if it exists at the given index. - * + * * @param index the index * @return the tag or null */ @@ -419,6 +420,4 @@ public final class ListTag extends Tag { return bldr.toString(); } - - } \ No newline at end of file diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/ListTagBuilder.java b/worldedit-core/src/main/java/com/sk89q/jnbt/ListTagBuilder.java index cd1f11e25..c410ec3ae 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/ListTagBuilder.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/ListTagBuilder.java @@ -19,13 +19,13 @@ package com.sk89q.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Helps create list tags. */ diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/LongArrayTag.java b/worldedit-core/src/main/java/com/sk89q/jnbt/LongArrayTag.java index 7d2022fb1..30dad0cc3 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/LongArrayTag.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/LongArrayTag.java @@ -16,13 +16,18 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ + package com.sk89q.jnbt; + import static com.google.common.base.Preconditions.checkNotNull; + /** * The {@code TAG_Long_Array} tag. */ public class LongArrayTag extends Tag { + private final long[] value; + /** * Creates the tag with an empty name. * @@ -33,10 +38,12 @@ public class LongArrayTag extends Tag { checkNotNull(value); this.value = value; } + @Override public long[] getValue() { return value; } + @Override public String toString() { StringBuilder hex = new StringBuilder(); @@ -49,4 +56,5 @@ public class LongArrayTag extends Tag { } return "TAG_Long_Array(" + hex + ")"; } -} \ No newline at end of file + +} diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTInputStream.java b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTInputStream.java index 86ffde60c..414af43fd 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTInputStream.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTInputStream.java @@ -37,7 +37,7 @@ import java.util.function.Function; * This class reads NBT, or Named Binary Tag * streams, and produces an object graph of subclasses of the {@code Tag} * object. - *

+ * *

The NBT format was created by Markus Persson, and the specification may be * found at * http://www.minecraft.net/docs/NBT.txt.

@@ -49,7 +49,7 @@ public final class NBTInputStream implements Closeable { /** * Creates a new {@code NBTInputStream}, which will source its data * from the specified input stream. - * + * * @param is the input stream * @throws IOException if an I/O error occurs */ @@ -67,7 +67,7 @@ public final class NBTInputStream implements Closeable { /** * Reads an NBT tag from the stream. - * + * * @return The tag that was read. * @throws IOException if an I/O error occurs. */ @@ -87,7 +87,7 @@ public final class NBTInputStream implements Closeable { /** * Reads an NBT from the stream. - * + * * @param depth the depth of this tag * @return The tag that was read. * @throws IOException if an I/O error occurs. @@ -519,8 +519,8 @@ public final class NBTInputStream implements Closeable { /** * Reads the payload of a tag given the type. - * - * @param type the type + * + * @param type the type * @param depth the depth * @return the tag * @throws IOException if an I/O error occurs. @@ -617,5 +617,4 @@ public final class NBTInputStream implements Closeable { } } - } diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTOutputStream.java b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTOutputStream.java index a9bf7e2b4..d1e860e6d 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTOutputStream.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTOutputStream.java @@ -19,6 +19,8 @@ package com.sk89q.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import com.boydti.fawe.object.io.LittleEndianOutputStream; import java.io.Closeable; import java.io.DataOutput; @@ -29,13 +31,10 @@ import java.io.OutputStream; import java.util.List; import java.util.Map; - -import static com.google.common.base.Preconditions.checkNotNull; - /** * This class writes NBT, or Named Binary Tag * {@code Tag} objects to an underlying {@code OutputStream}. - *

+ * *

The NBT format was created by Markus Persson, and the specification may be * found at * http://www.minecraft.net/docs/NBT.txt.

@@ -50,9 +49,11 @@ public final class NBTOutputStream implements Closeable { /** * Creates a new {@code NBTOutputStream}, which will write data to the * specified underlying output stream. - * - * @param os The output stream. - * @throws IOException if an I/O error occurs. + * + * @param os + * The output stream. + * @throws IOException + * if an I/O error occurs. */ public NBTOutputStream(OutputStream os) throws IOException { this.os = new DataOutputStream(os); @@ -74,13 +75,16 @@ public final class NBTOutputStream implements Closeable { /** * Writes a tag. - * - * @param tag The tag to write. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag to write. + * @throws IOException + * if an I/O error occurs. */ public void writeNamedTag(String name, Tag tag) throws IOException { checkNotNull(name); checkNotNull(tag); + int type = NBTUtils.getTypeCode(tag.getClass()); writeNamedTagName(name, type); if (type == NBTConstants.TYPE_END) { @@ -197,62 +201,66 @@ public final class NBTOutputStream implements Closeable { /** * Writes tag payload. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ public void writeTagPayload(Tag tag) throws IOException { int type = NBTUtils.getTypeCode(tag.getClass()); switch (type) { - case NBTConstants.TYPE_END: - writeEndTagPayload((EndTag) tag); - break; - case NBTConstants.TYPE_BYTE: - writeByteTagPayload((ByteTag) tag); - break; - case NBTConstants.TYPE_SHORT: - writeShortTagPayload((ShortTag) tag); - break; - case NBTConstants.TYPE_INT: - writeIntTagPayload((IntTag) tag); - break; - case NBTConstants.TYPE_LONG: - writeLongTagPayload((LongTag) tag); - break; - case NBTConstants.TYPE_FLOAT: - writeFloatTagPayload((FloatTag) tag); - break; - case NBTConstants.TYPE_DOUBLE: - writeDoubleTagPayload((DoubleTag) tag); - break; - case NBTConstants.TYPE_BYTE_ARRAY: - writeByteArrayTagPayload((ByteArrayTag) tag); - break; - case NBTConstants.TYPE_STRING: - writeStringTagPayload((StringTag) tag); - break; - case NBTConstants.TYPE_LIST: - writeListTagPayload((ListTag) tag); - break; - case NBTConstants.TYPE_COMPOUND: - writeCompoundTagPayload((CompoundTag) tag); - break; - case NBTConstants.TYPE_INT_ARRAY: - writeIntArrayTagPayload((IntArrayTag) tag); - break; - case NBTConstants.TYPE_LONG_ARRAY: - writeLongArrayTagPayload((LongArrayTag) tag); - break; - default: - throw new IOException("Invalid tag type: " + type + "."); + case NBTConstants.TYPE_END: + writeEndTagPayload((EndTag) tag); + break; + case NBTConstants.TYPE_BYTE: + writeByteTagPayload((ByteTag) tag); + break; + case NBTConstants.TYPE_SHORT: + writeShortTagPayload((ShortTag) tag); + break; + case NBTConstants.TYPE_INT: + writeIntTagPayload((IntTag) tag); + break; + case NBTConstants.TYPE_LONG: + writeLongTagPayload((LongTag) tag); + break; + case NBTConstants.TYPE_FLOAT: + writeFloatTagPayload((FloatTag) tag); + break; + case NBTConstants.TYPE_DOUBLE: + writeDoubleTagPayload((DoubleTag) tag); + break; + case NBTConstants.TYPE_BYTE_ARRAY: + writeByteArrayTagPayload((ByteArrayTag) tag); + break; + case NBTConstants.TYPE_STRING: + writeStringTagPayload((StringTag) tag); + break; + case NBTConstants.TYPE_LIST: + writeListTagPayload((ListTag) tag); + break; + case NBTConstants.TYPE_COMPOUND: + writeCompoundTagPayload((CompoundTag) tag); + break; + case NBTConstants.TYPE_INT_ARRAY: + writeIntArrayTagPayload((IntArrayTag) tag); + break; + case NBTConstants.TYPE_LONG_ARRAY: + writeLongArrayTagPayload((LongArrayTag) tag); + break; + default: + throw new IOException("Invalid tag type: " + type + "."); } } /** * Writes a {@code TAG_Byte} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeByteTagPayload(ByteTag tag) throws IOException { os.writeByte(tag.getValue()); @@ -260,9 +268,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Byte_Array} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeByteArrayTagPayload(ByteArrayTag tag) throws IOException { byte[] bytes = tag.getValue(); @@ -272,9 +282,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Compound} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Map.Entry entry : tag.getValue().entrySet()) { @@ -285,9 +297,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_List} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeListTagPayload(ListTag tag) throws IOException { Class clazz = tag.getType(); @@ -310,9 +324,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_String} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeStringTagPayload(StringTag tag) throws IOException { byte[] bytes = tag.getValue().getBytes(NBTConstants.CHARSET); @@ -322,9 +338,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Double} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeDoubleTagPayload(DoubleTag tag) throws IOException { os.writeDouble(tag.getValue()); @@ -332,9 +350,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Float} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeFloatTagPayload(FloatTag tag) throws IOException { os.writeFloat(tag.getValue()); @@ -342,9 +362,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Long} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeLongTagPayload(LongTag tag) throws IOException { os.writeLong(tag.getValue()); @@ -352,9 +374,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Int} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeIntTagPayload(IntTag tag) throws IOException { os.writeInt(tag.getValue()); @@ -362,9 +386,11 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Short} tag. - * - * @param tag The tag. - * @throws IOException if an I/O error occurs. + * + * @param tag + * The tag. + * @throws IOException + * if an I/O error occurs. */ private void writeShortTagPayload(ShortTag tag) throws IOException { os.writeShort(tag.getValue()); @@ -372,19 +398,19 @@ public final class NBTOutputStream implements Closeable { /** * Writes a {@code TAG_Empty} tag. - * + * * @param tag the tag */ private void writeEndTagPayload(EndTag tag) { /* empty */ } - + private void writeIntArrayTagPayload(IntArrayTag tag) throws IOException { int[] data = tag.getValue(); os.writeInt(data.length); for (int aData : data) { os.writeInt(aData); - } + } } private void writeLongArrayTagPayload(LongArrayTag tag) throws IOException { diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java index 84a8a0a5b..e44262911 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java @@ -19,13 +19,13 @@ package com.sk89q.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.world.storage.InvalidFormatException; import java.util.Map; -import static com.google.common.base.Preconditions.checkNotNull; - /** * A class which contains NBT-related utility methods. * diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/Tag.java b/worldedit-core/src/main/java/com/sk89q/jnbt/Tag.java index f6eaa35ea..6ff25faa7 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/Tag.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/Tag.java @@ -26,7 +26,7 @@ public abstract class Tag { /** * Gets the value of this tag. - * + * * @return the value */ public abstract Object getValue(); @@ -34,8 +34,4 @@ public abstract class Tag { public Object getRaw() { return getValue(); } - - - - } \ No newline at end of file diff --git a/worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandException.java b/worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandException.java index 1dcbdde1e..4345793d1 100644 --- a/worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandException.java +++ b/worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandException.java @@ -19,12 +19,13 @@ package com.sk89q.minecraft.util.commands; -import javax.annotation.Nullable; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.ArrayList; import java.util.List; import java.util.ListIterator; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; public class CommandException extends Exception { diff --git a/worldedit-core/src/main/java/com/sk89q/util/ReflectionUtil.java b/worldedit-core/src/main/java/com/sk89q/util/ReflectionUtil.java index 30643ca06..bec4e79ed 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/ReflectionUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/util/ReflectionUtil.java @@ -28,7 +28,8 @@ import java.util.*; public final class ReflectionUtil { - private ReflectionUtil() {} + private ReflectionUtil() { + } @SuppressWarnings("unchecked") public static T getField(Object from, String name) { @@ -50,4 +51,5 @@ public final class ReflectionUtil { } while (checkClass.getSuperclass() != Object.class && ((checkClass = checkClass.getSuperclass()) != null)); return null; } + } diff --git a/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java b/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java index f7b54c369..2571f71f9 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java @@ -34,7 +34,7 @@ public final class StringUtil { /** * Trim a string if it is longer than a certain length. - * + * * @param str the stirng * @param len the length to trim to * @return a new string @@ -49,7 +49,7 @@ public final class StringUtil { /** * Join an array of strings into a string. - * + * * @param str the string array * @param delimiter the delimiter * @param initialIndex the initial index to start form @@ -68,7 +68,7 @@ public final class StringUtil { /** * Join an array of strings into a string. - * + * * @param str the string array * @param delimiter the delimiter * @param initialIndex the initial index to start form @@ -76,7 +76,7 @@ public final class StringUtil { * @return a new string */ public static String joinQuotedString(String[] str, String delimiter, - int initialIndex, String quote) { + int initialIndex, String quote) { if (str.length == 0) { return ""; } @@ -92,7 +92,7 @@ public final class StringUtil { /** * Join an array of strings into a string. - * + * * @param str the string array * @param delimiter the delimiter * @return a new string @@ -103,7 +103,7 @@ public final class StringUtil { /** * Join an array of strings into a string. - * + * * @param str an array of objects * @param delimiter the delimiter * @param initialIndex the initial index to start form @@ -122,7 +122,7 @@ public final class StringUtil { /** * Join an array of strings into a string. - * + * * @param str a list of integers * @param delimiter the delimiter * @param initialIndex the initial index to start form @@ -219,7 +219,7 @@ public final class StringUtil { * calculated). (Note that the arrays aren't really copied anymore, just * switched...this is clearly much better than cloning an array or doing * a System.arraycopy() each time through the outer loop.) - * + * * Effectively, the difference between the two implementations is this * one does not cause an out of memory condition when calculating the LD * over two very large strings. @@ -323,4 +323,4 @@ public final class StringUtil { return parsableBlocks; } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java index db61b1dd0..d0e5fc0c7 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java +++ b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLNode.java @@ -23,12 +23,13 @@ import com.sk89q.worldedit.BlockVector2D; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import javax.annotation.Nullable; + /** * Represents a configuration node. */ diff --git a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java index 1296733a6..48eb06e69 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java +++ b/worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java @@ -27,7 +27,13 @@ import org.yaml.snakeyaml.nodes.Tag; import org.yaml.snakeyaml.reader.UnicodeReader; import org.yaml.snakeyaml.representer.Representer; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.HashMap; @@ -294,4 +300,5 @@ public class YAMLProcessor extends YAMLNode { this.nullRepresenter = o -> representScalar(Tag.NULL, ""); } } -} \ No newline at end of file + +} 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 c14ff2337..e6ca93f9a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -816,7 +816,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Return fast mode status. - *

+ * *

Fast mode may skip lighting checks or adjacent block * notification.

* @@ -991,8 +991,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Set a block, bypassing both history and block re-ordering. * * @param position the position to set the block at - * @param block the block - * @param stage the level + * @param block the block + * @param stage the level * @return whether the block changed * @throws WorldEditException thrown on a set error */ @@ -1014,7 +1014,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Set a block, bypassing history but still utilizing block re-ordering. * * @param position the position to set the block at - * @param block the block + * @param block the block * @return whether the block changed */ public boolean smartSetBlock(final Vector position, final BlockStateHolder block) { @@ -1589,7 +1589,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Sets all the blocks inside a region to a given pattern. * - * @param region the region + * @param region the region * @param pattern the pattern that provides the replacement block * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1643,8 +1643,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Replaces all the blocks matching a given mask, within a given region, to a block * returned by a given pattern. * - * @param region the region to replace the blocks within - * @param mask the mask that blocks must match + * @param region the region to replace the blocks within + * @param mask the mask that blocks must match * @param pattern the pattern that provides the new blocks * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1666,7 +1666,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * If the center sits between two blocks on a certain axis, then two blocks * will be placed to mark the center. * - * @param region the region to find the center of + * @param region the region to find the center of * @param pattern the replacement pattern * @return the number of blocks placed * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1686,7 +1686,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Make the faces of the given region as if it was a {@link CuboidRegion}. * * @param region the region - * @param block the block to place + * @param block the block to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -1698,7 +1698,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Make the faces of the given region as if it was a {@link CuboidRegion}. * - * @param region the region + * @param region the region * @param pattern the pattern to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1718,7 +1718,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * may be inefficient, because there may not be an efficient implementation supported * for that specific shape. * - * @param region the region + * @param region the region * @param pattern the pattern to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1735,12 +1735,13 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, } } + /** * Make the walls (all faces but those parallel to the X-Z plane) of the given region * as if it was a {@link CuboidRegion}. * * @param region the region - * @param block the block to place + * @param block the block to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -1753,7 +1754,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Make the walls (all faces but those parallel to the X-Z plane) of the given region * as if it was a {@link CuboidRegion}. * - * @param region the region + * @param region the region * @param pattern the pattern to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1773,7 +1774,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * may be inefficient, because there may not be an efficient implementation supported * for that specific shape. * - * @param region the region + * @param region the region * @param pattern the pattern to place * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1803,7 +1804,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * (as if it were a cuboid). * * @param region the region - * @param block the placed block + * @param block the placed block * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -1816,7 +1817,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Places a layer of blocks on top of ground blocks in the given region * (as if it were a cuboid). * - * @param region the region + * @param region the region * @param pattern the placed block pattern * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1859,9 +1860,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Stack a cuboid region. * - * @param region the region to stack - * @param dir the direction to stack - * @param count the number of times to stack + * @param region the region to stack + * @param dir the direction to stack + * @param count the number of times to stack * @param copyAir true to also copy air blocks * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1893,10 +1894,10 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Move the blocks in a region a certain direction. * - * @param region the region to move - * @param dir the direction - * @param distance the distance to move - * @param copyAir true to copy air blocks + * @param region the region to move + * @param dir the direction + * @param distance the distance to move + * @param copyAir true to copy air blocks * @param replacement the replacement block to fill in after moving, or null to use air * @return number of blocks moved * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -1950,10 +1951,10 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Move the blocks in a region a certain direction. * - * @param region the region to move - * @param dir the direction - * @param distance the distance to move - * @param copyAir true to copy air blocks + * @param region the region to move + * @param dir the direction + * @param distance the distance to move + * @param copyAir true to copy air blocks * @param replacement the replacement block to fill in after moving, or null to use air * @return number of blocks moved * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -2005,8 +2006,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Fix liquids so that they turn into stationary blocks and extend outward. * - * @param origin the original position - * @param radius the radius to fix + * @param origin the original position + * @param radius the radius to fix * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2037,8 +2038,8 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Makes a cylinder. * - * @param pos Center of the cylinder - * @param block The block pattern to use + * @param pos Center of the cylinder + * @param block The block pattern to use * @param radius The cylinder's radius * @param height The cylinder's up/down extent. If negative, extend downward. * @param filled If false, only a shell will be generated. @@ -2052,12 +2053,12 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Makes a cylinder. * - * @param pos Center of the cylinder - * @param block The block pattern to use + * @param pos Center of the cylinder + * @param block The block pattern to use * @param radiusX The cylinder's largest north/south extent * @param radiusZ The cylinder's largest east/west extent - * @param height The cylinder's up/down extent. If negative, extend downward. - * @param filled If false, only a shell will be generated. + * @param height The cylinder's up/down extent. If negative, extend downward. + * @param filled If false, only a shell will be generated. * @return number of blocks changed * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2266,28 +2267,28 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, } /** - * Makes a sphere. - * - * @param pos Center of the sphere or ellipsoid - * @param block The block pattern to use - * @param radius The sphere's radius - * @param filled If false, only a shell will be generated. - * @return number of blocks changed - * @throws MaxChangedBlocksException thrown if too many blocks are changed - */ + * Makes a sphere. + * + * @param pos Center of the sphere or ellipsoid + * @param block The block pattern to use + * @param radius The sphere's radius + * @param filled If false, only a shell will be generated. + * @return number of blocks changed + * @throws MaxChangedBlocksException thrown if too many blocks are changed + */ public int makeSphere(final Vector pos, final Pattern block, final double radius, final boolean filled) { - return this.makeSphere(pos, block, radius, radius, radius, filled); + return makeSphere(pos, block, radius, radius, radius, filled); } /** * Makes a sphere or ellipsoid. * - * @param pos Center of the sphere or ellipsoid - * @param block The block pattern to use + * @param pos Center of the sphere or ellipsoid + * @param block The block pattern to use * @param radiusX The sphere/ellipsoid's largest north/south extent * @param radiusY The sphere/ellipsoid's largest up/down extent * @param radiusZ The sphere/ellipsoid's largest east/west extent - * @param filled If false, only a shell will be generated. + * @param filled If false, only a shell will be generated. * @return number of blocks changed * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2364,9 +2365,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Makes a pyramid. * * @param position a position - * @param block a block - * @param size size of pyramid - * @param filled true if filled + * @param block a block + * @param size size of pyramid + * @param filled true if filled * @return number of blocks changed * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2394,7 +2395,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Thaw blocks in a radius. * * @param position the position - * @param radius the radius + * @param radius the radius * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2443,7 +2444,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Make snow in a radius. * * @param position a position - * @param radius a radius + * @param radius a radius * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2508,7 +2509,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Make dirt green. * * @param position a position - * @param radius a radius + * @param radius a radius * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2567,7 +2568,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Makes pumpkin patches randomly in an area around the given position. * * @param position the base position - * @param apothem the apothem of the (square) area + * @param apothem the apothem of the (square) area * @return number of patches created * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2828,9 +2829,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Hollows out the region (Semi-well-defined for non-cuboid selections). * - * @param region the region to hollow out. + * @param region the region to hollow out. * @param thickness the thickness of the shell to leave (manhattan distance) - * @param pattern The block pattern to use + * @param pattern The block pattern to use * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2914,10 +2915,11 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, * Draws a line (out of blocks) between two vectors. * * @param pattern The block pattern used to draw the line. - * @param pos1 One of the points that define the line. - * @param pos2 The other point that defines the line. - * @param radius The radius (thickness) of the line. - * @param filled If false, only a shell will be generated. + * @param pos1 One of the points that define the line. + * @param pos2 The other point that defines the line. + * @param radius The radius (thickness) of the line. + * @param filled If false, only a shell will be generated. + * * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -2983,14 +2985,15 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, /** * Draws a spline (out of blocks) between specified vectors. * - * @param pattern The block pattern used to draw the spline. + * @param pattern The block pattern used to draw the spline. * @param nodevectors The list of vectors to draw through. - * @param tension The tension of every node. - * @param bias The bias of every node. - * @param continuity The continuity of every node. - * @param quality The quality of the spline. Must be greater than 0. - * @param radius The radius (thickness) of the spline. - * @param filled If false, only a shell will be generated. + * @param tension The tension of every node. + * @param bias The bias of every node. + * @param continuity The continuity of every node. + * @param quality The quality of the spline. Must be greater than 0. + * @param radius The radius (thickness) of the spline. + * @param filled If false, only a shell will be generated. + * * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed */ @@ -3121,7 +3124,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, for (final Vector recurseDirection : this.recurseDirections) { queue.addLast(current.add(recurseDirection).toBlockVector()); } - } + } // while } public int makeBiomeShape(final Region region, final Vector zero, final Vector unit, final BaseBiome biomeType, final String expressionString, final boolean hollow) throws ExpressionException { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionFactory.java index 8af5071c6..094da742e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionFactory.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.event.extent.EditSessionEvent; import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.util.eventbus.EventBus; import com.sk89q.worldedit.world.World; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Creates new {@link EditSession}s. To get an instance of this factory, * use {@link WorldEdit#getEditSessionFactory()}. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java index 288e49995..f9d8a088d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit; +import com.sk89q.worldedit.util.logging.LogFormat; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.item.ItemTypes; -import com.sk89q.worldedit.util.logging.LogFormat; import com.sk89q.worldedit.world.registry.LegacyMapper; import com.sk89q.worldedit.world.snapshot.SnapshotRepository; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java index 0666d2de1..04c438305 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java @@ -141,7 +141,7 @@ public class LocalSession implements TextureHolder { /** * Construct the object. - *

+ * *

{@link #setConfiguration(LocalConfiguration)} should be called * later with configuration.

*/ @@ -495,7 +495,7 @@ public class LocalSession implements TextureHolder { * Performs an undo. * * @param newBlockBag a new block bag - * @param player the player + * @param player the player * @return whether anything was undone */ public EditSession undo(@Nullable BlockBag newBlockBag, Player player) { @@ -531,7 +531,7 @@ public class LocalSession implements TextureHolder { * Performs a redo * * @param newBlockBag a new block bag - * @param player the player + * @param player the player * @return whether anything was redone */ public EditSession redo(@Nullable BlockBag newBlockBag, Player player) { @@ -620,7 +620,7 @@ public class LocalSession implements TextureHolder { /** * Set the region selector. * - * @param world the world + * @param world the world * @param selector the selector */ public void setRegionSelector(World world, RegionSelector selector) { @@ -777,7 +777,7 @@ public class LocalSession implements TextureHolder { /** * Sets the clipboard. - *

+ * *

Pass {@code null} to clear the clipboard.

* * @param clipboard the clipboard, or null if the clipboard is to be cleared @@ -969,7 +969,7 @@ public class LocalSession implements TextureHolder { * or the tool is not assigned, the slot will be replaced with the * brush tool. * - * @param item the item type ID + * @param item the item type * @return the tool, or {@code null} * @throws InvalidToolBindException if the item can't be bound to that item */ @@ -1010,7 +1010,7 @@ public class LocalSession implements TextureHolder { /** * Set the tool. * - * @param item the item type ID + * @param item the item type * @param tool the tool to set, which can be {@code null} * @throws InvalidToolBindException if the item can't be bound to that item */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/PlayerDirection.java b/worldedit-core/src/main/java/com/sk89q/worldedit/PlayerDirection.java index 45eb24dba..2a82fea88 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/PlayerDirection.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/PlayerDirection.java @@ -55,4 +55,4 @@ public enum PlayerDirection { return isOrthogonal; } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java index 8ce05ce2d..7dc557852 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java @@ -21,6 +21,7 @@ package com.sk89q.worldedit; import com.boydti.fawe.util.MathMan; import com.sk89q.worldedit.math.transform.AffineTransform; + import java.io.IOException; import java.io.Serializable; import javax.annotation.Nullable; @@ -96,7 +97,7 @@ public class Vector extends Vector2D implements Comparable, Serializable /** * Construct a new instance with X, Y, and Z coordinates set to 0. - *

+ * *

One can also refer to a static {@link #ZERO}.

*/ public Vector() { @@ -648,7 +649,7 @@ public class Vector extends Vector2D implements Comparable, Serializable /** * Rounds all components to the closest integer. - *

+ * *

Components < 0.5 are rounded down, otherwise up.

* * @return a new vector @@ -670,9 +671,9 @@ public class Vector extends Vector2D implements Comparable, Serializable /** * Perform a 2D transformation on this vector and return a new one. * - * @param angle in degrees - * @param aboutX about which x coordinate to rotate - * @param aboutZ about which z coordinate to rotate + * @param angle in degrees + * @param aboutX about which x coordinate to rotate + * @param aboutZ about which z coordinate to rotate * @param translateX what to add after rotation * @param translateZ what to add after rotation * @return a new vector @@ -686,9 +687,9 @@ public class Vector extends Vector2D implements Comparable, Serializable double z2 = x * Math.sin(angle) + z * Math.cos(angle); return new Vector( - x2 + aboutX + translateX, - getY(), - z2 + aboutZ + translateZ + x2 + aboutX + translateX, + getY(), + z2 + aboutZ + translateZ ); } @@ -779,9 +780,9 @@ public class Vector extends Vector2D implements Comparable, Serializable */ public static BlockVector toBlockPoint(double x, double y, double z) { return new BlockVector( - Math.floor(x), - Math.floor(y), - Math.floor(z) + Math.floor(x), + Math.floor(y), + Math.floor(z) ); } @@ -792,9 +793,9 @@ public class Vector extends Vector2D implements Comparable, Serializable */ public BlockVector toBlockPoint() { return new BlockVector( - Math.floor(getX()), - Math.floor(getY()), - Math.floor(getZ()) + Math.floor(getX()), + Math.floor(getY()), + Math.floor(getZ()) ); } @@ -880,7 +881,7 @@ public class Vector extends Vector2D implements Comparable, Serializable Math.max(v1.getZ(), v2.getZ()) ); } - + /** * Gets the midpoint of two vectors. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector2D.java index be32c1e21..b75fdda04 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector2D.java @@ -80,7 +80,7 @@ public class Vector2D implements Serializable { /** * Construct a new instance with X and Z coordinates set to 0. - *

+ * *

One can also refer to a static {@link #ZERO}.

*/ public Vector2D() { @@ -511,7 +511,7 @@ public class Vector2D implements Serializable { /** * Rounds all components to the closest integer. - *

+ * *

Components < 0.5 are rounded down, otherwise up.

* * @return a new vector @@ -533,9 +533,9 @@ public class Vector2D implements Serializable { /** * Perform a 2D transformation on this vector and return a new one. * - * @param angle in degrees - * @param aboutX about which x coordinate to rotate - * @param aboutZ about which z coordinate to rotate + * @param angle in degrees + * @param aboutX about which x coordinate to rotate + * @param aboutZ about which z coordinate to rotate * @param translateX what to add after rotation * @param translateZ what to add after rotation * @return a new vector @@ -548,8 +548,8 @@ public class Vector2D implements Serializable { double x2 = x * Math.cos(angle) - z * Math.sin(angle); double z2 = x * Math.sin(angle) + z * Math.cos(angle); return new Vector2D( - x2 + aboutX + translateX, - z2 + aboutZ + translateZ + x2 + aboutX + translateX, + z2 + aboutZ + translateZ ); } @@ -648,8 +648,8 @@ public class Vector2D implements Serializable { */ public static Vector2D getMinimum(Vector2D v1, Vector2D v2) { return new Vector2D( - Math.min(v1.getX(), v2.getX()), - Math.min(v1.getZ(), v2.getZ()) + Math.min(v1.getX(), v2.getX()), + Math.min(v1.getZ(), v2.getZ()) ); } @@ -662,8 +662,8 @@ public class Vector2D implements Serializable { */ public static Vector2D getMaximum(Vector2D v1, Vector2D v2) { return new Vector2D( - Math.max(v1.getX(), v2.getX()), - Math.max(v1.getZ(), v2.getZ()) + Math.max(v1.getX(), v2.getX()), + Math.max(v1.getZ(), v2.getZ()) ); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java index 653e866ba..e520a2e8a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -19,6 +19,9 @@ package com.sk89q.worldedit; +import static com.sk89q.worldedit.event.platform.Interaction.HIT; +import static com.sk89q.worldedit.event.platform.Interaction.OPEN; + import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.sk89q.worldedit.blocks.BaseItem; @@ -56,7 +59,6 @@ import com.sk89q.worldedit.world.registry.BundledBlockData; import com.sk89q.worldedit.world.registry.BundledItemData; import com.sk89q.worldedit.world.registry.LegacyMapper; -import javax.script.ScriptException; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; @@ -69,8 +71,7 @@ import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; -import static com.sk89q.worldedit.event.platform.Interaction.HIT; -import static com.sk89q.worldedit.event.platform.Interaction.OPEN; +import javax.script.ScriptException; /** * The entry point and container for a working implementation of WorldEdit. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/blocks/ClothColor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/blocks/ClothColor.java index 23562fdf0..dd3ba1fc2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/blocks/ClothColor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/blocks/ClothColor.java @@ -19,10 +19,11 @@ package com.sk89q.worldedit.blocks; -import javax.annotation.Nullable; -import java.util.Map; -import java.util.HashMap; import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Nullable; /** * The colors for wool. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ItemParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ItemParser.java index 878fc013c..880c17fb8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ItemParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ItemParser.java @@ -24,13 +24,13 @@ import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.blocks.BaseItem; -import com.sk89q.worldedit.util.command.composition.SimpleCommand; import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.command.argument.CommandArgs; +import com.sk89q.worldedit.util.command.composition.SimpleCommand; import com.sk89q.worldedit.world.World; public class ItemParser extends SimpleCommand { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ReplaceParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ReplaceParser.java index 10577b874..4d98103c3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ReplaceParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/ReplaceParser.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.command.argument; +import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; + import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.extent.NullExtent; @@ -26,13 +28,9 @@ import com.sk89q.worldedit.function.Contextual; import com.sk89q.worldedit.function.EditContext; import com.sk89q.worldedit.function.RegionFunction; import com.sk89q.worldedit.function.block.BlockReplace; -import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.command.argument.CommandArgs; import com.sk89q.worldedit.util.command.composition.SimpleCommand; -import com.sk89q.worldedit.world.block.BlockStateHolder; - -import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; public class ReplaceParser extends SimpleCommand> { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ApplyCommand.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ApplyCommand.java index 50c0710ea..a73748e4c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ApplyCommand.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ApplyCommand.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.command.composition; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.command.argument.RegionFunctionParser; @@ -30,8 +32,6 @@ import com.sk89q.worldedit.util.command.argument.CommandArgs; import com.sk89q.worldedit.util.command.composition.CommandExecutor; import com.sk89q.worldedit.util.command.composition.SimpleCommand; -import static com.google.common.base.Preconditions.checkNotNull; - public class ApplyCommand extends SimpleCommand> { private final CommandExecutor> functionParser; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ShapedBrushCommand.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ShapedBrushCommand.java index efe6c3aab..35a8734b6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ShapedBrushCommand.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ShapedBrushCommand.java @@ -20,6 +20,9 @@ package com.sk89q.worldedit.command.composition; import com.boydti.fawe.config.BBC; + +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.minecraft.util.commands.CommandPermissionsException; @@ -41,8 +44,6 @@ import com.sk89q.worldedit.util.command.argument.CommandArgs; import com.sk89q.worldedit.util.command.composition.CommandExecutor; import com.sk89q.worldedit.util.command.composition.SimpleCommand; -import static com.google.common.base.Preconditions.checkNotNull; - public class ShapedBrushCommand extends SimpleCommand { private final CommandExecutor> delegate; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java index a1b51e256..7488c14ad 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java @@ -19,7 +19,8 @@ package com.sk89q.worldedit.command.tool; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.LocalConfiguration; +import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Platform; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java index 5a8f6165e..1ad0441a4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java @@ -23,11 +23,11 @@ import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.LocalConfiguration; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.blocks.MobSpawnerBlock; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Platform; import com.sk89q.worldedit.world.World; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Looks up information about a block. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/CylinderBrush.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/CylinderBrush.java index 3aa52262c..10db344ca 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/CylinderBrush.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/CylinderBrush.java @@ -22,9 +22,9 @@ package com.sk89q.worldedit.command.tool.brush; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; +import com.sk89q.worldedit.world.block.BlockTypes; public class CylinderBrush implements Brush { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowCylinderBrush.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowCylinderBrush.java index 5955531bf..13859d587 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowCylinderBrush.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowCylinderBrush.java @@ -22,11 +22,9 @@ package com.sk89q.worldedit.command.tool.brush; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; +import com.sk89q.worldedit.world.block.BlockTypes; public class HollowCylinderBrush implements Brush { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowSphereBrush.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowSphereBrush.java index 6c689652c..d7115efe3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowSphereBrush.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowSphereBrush.java @@ -22,11 +22,9 @@ package com.sk89q.worldedit.command.tool.brush; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; +import com.sk89q.worldedit.world.block.BlockTypes; public class HollowSphereBrush implements Brush { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SmoothBrush.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SmoothBrush.java index d52ebbd4b..df76950d4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SmoothBrush.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SmoothBrush.java @@ -20,11 +20,11 @@ package com.sk89q.worldedit.command.tool.brush; import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.function.pattern.Pattern; -import com.sk89q.worldedit.math.convolution.HeightMap; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.convolution.GaussianKernel; +import com.sk89q.worldedit.math.convolution.HeightMap; import com.sk89q.worldedit.math.convolution.HeightMapFilter; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Region; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SphereBrush.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SphereBrush.java index cfcaa91e5..781ee6d1f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SphereBrush.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SphereBrush.java @@ -23,10 +23,9 @@ import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; +import com.sk89q.worldedit.world.block.BlockTypes; public class SphereBrush implements Brush { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/EntityRemover.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/EntityRemover.java index 862b79505..529f06f81 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/EntityRemover.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/EntityRemover.java @@ -21,14 +21,11 @@ package com.sk89q.worldedit.command.util; import static com.google.common.base.Preconditions.checkNotNull; -import com.boydti.fawe.util.SetQueue; import com.boydti.fawe.util.TaskManager; -import com.google.common.base.Supplier; import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.worldedit.entity.metadata.EntityProperties; import com.sk89q.worldedit.function.EntityFunction; -import java.util.concurrent.Callable; import java.util.regex.Pattern; import javax.annotation.Nullable; @@ -151,6 +148,7 @@ public class EntityRemover { return true; } } + return false; }; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/entity/BaseEntity.java b/worldedit-core/src/main/java/com/sk89q/worldedit/entity/BaseEntity.java index fe897baca..456acaa3d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/entity/BaseEntity.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/entity/BaseEntity.java @@ -19,16 +19,14 @@ package com.sk89q.worldedit.entity; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.world.NbtValued; import com.sk89q.worldedit.world.entity.EntityType; import javax.annotation.Nullable; -import java.util.HashMap; - -import static com.google.common.base.Preconditions.checkNotNull; - /** * Represents a mutable "snapshot" of an entity. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/BlockInteractEvent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/BlockInteractEvent.java index 2fdb4e443..7549518ad 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/BlockInteractEvent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/BlockInteractEvent.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.event.platform; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.event.Cancellable; import com.sk89q.worldedit.event.Event; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.util.Location; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Called when a block is interacted with. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/CommandSuggestionEvent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/CommandSuggestionEvent.java index 8fa39c0ff..75483745e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/CommandSuggestionEvent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/CommandSuggestionEvent.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.event.platform; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.event.Event; import com.sk89q.worldedit.extension.platform.Actor; import java.util.Collections; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Posted when suggestions for auto-completion are requested for command input. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/ConfigurationLoadEvent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/ConfigurationLoadEvent.java index 73d23131c..1bfc11724 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/ConfigurationLoadEvent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/ConfigurationLoadEvent.java @@ -19,11 +19,11 @@ package com.sk89q.worldedit.event.platform; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.LocalConfiguration; import com.sk89q.worldedit.event.Event; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Raised when the configuration has been loaded or re-loaded. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlayerInputEvent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlayerInputEvent.java index 2bc39ee97..67ef25268 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlayerInputEvent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlayerInputEvent.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.event.platform; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.event.Cancellable; import com.sk89q.worldedit.event.Event; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Raised whenever a player sends input. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/BlockFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/BlockFactory.java index 53d131de7..aab3504f4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/BlockFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/BlockFactory.java @@ -21,14 +21,11 @@ package com.sk89q.worldedit.extension.factory; import com.sk89q.util.StringUtil; import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.extension.input.ParserContext; +import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.extension.input.InputParseException; +import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.internal.registry.AbstractFactory; +import com.sk89q.worldedit.world.block.BlockStateHolder; import java.util.HashSet; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java index 9d826fb25..01fef9803 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java @@ -39,6 +39,7 @@ public final class MaskFactory extends AbstractFactory { */ public MaskFactory(WorldEdit worldEdit) { super(worldEdit); + parsers.add(new DefaultMaskParser(worldEdit)); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/PatternFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/PatternFactory.java index 08d453f66..dde70291e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/PatternFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/PatternFactory.java @@ -39,6 +39,7 @@ public final class PatternFactory extends AbstractFactory { */ public PatternFactory(WorldEdit worldEdit) { super(worldEdit); + parsers.add(new HashTagPatternParser(worldEdit)); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/RandomPatternParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/RandomPatternParser.java index cf3383c3a..2cc9eae94 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/RandomPatternParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/RandomPatternParser.java @@ -21,14 +21,13 @@ package com.sk89q.worldedit.extension.factory; import com.sk89q.util.StringUtil; import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.input.InputParseException; +import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.internal.registry.InputParser; +import com.sk89q.worldedit.world.block.BlockStateHolder; class RandomPatternParser extends InputParser { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/SingleBlockPatternParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/SingleBlockPatternParser.java index 17833cf97..cd3adb5e7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/SingleBlockPatternParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/SingleBlockPatternParser.java @@ -20,11 +20,11 @@ package com.sk89q.worldedit.extension.factory; import com.sk89q.worldedit.WorldEdit; +import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.internal.registry.InputParser; -import com.sk89q.worldedit.extension.input.InputParseException; class SingleBlockPatternParser extends InputParser { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Actor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Actor.java index 019a28be3..43f665423 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Actor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Actor.java @@ -19,7 +19,6 @@ package com.sk89q.worldedit.extension.platform; -import com.sk89q.worldedit.entity.metadata.Metadatable; import com.sk89q.worldedit.internal.cui.CUIEvent; import com.sk89q.worldedit.session.SessionOwner; import com.sk89q.worldedit.util.Identifiable; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java index 517c98e93..3b37a98b5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java @@ -25,10 +25,11 @@ import com.sk89q.worldedit.util.command.Dispatcher; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.registry.Registries; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; +import javax.annotation.Nullable; + /** * Represents a platform that WorldEdit has been implemented for. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/OutputExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/OutputExtent.java index fe1ac4936..36747fd97 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/OutputExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/OutputExtent.java @@ -22,10 +22,9 @@ package com.sk89q.worldedit.extent; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.function.operation.Operation; import com.sk89q.worldedit.world.biome.BaseBiome; +import com.sk89q.worldedit.world.block.BlockStateHolder; import javax.annotation.Nullable; @@ -36,8 +35,8 @@ public interface OutputExtent { /** * Change the block at the given location to the given block. The operation may - * not tie the given {@link BlockState} to the world, so future changes to the - * {@link BlockState} do not affect the world until this method is called again. + * not tie the given {@link BlockStateHolder} to the world, so future changes to the + * {@link BlockStateHolder} do not affect the world until this method is called again. * *

The return value of this method indicates whether the change was probably * successful. It may not be successful if, for example, the location is out diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ForgetfulExtentBuffer.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ForgetfulExtentBuffer.java index 9ea2e1fd6..3905f4ccb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ForgetfulExtentBuffer.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ForgetfulExtentBuffer.java @@ -24,9 +24,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.Mask; @@ -35,6 +32,8 @@ import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.AbstractRegion; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionOperationException; +import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockTypes; import java.util.Iterator; import java.util.LinkedHashMap; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/cache/LastAccessExtentCache.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/cache/LastAccessExtentCache.java index 851cb192b..b4c4e267a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/cache/LastAccessExtentCache.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/cache/LastAccessExtentCache.java @@ -65,4 +65,4 @@ public class LastAccessExtentCache extends AbstractDelegateExtent { } } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/StoredEntity.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/StoredEntity.java index 4311ada18..4b56e5e06 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/StoredEntity.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/StoredEntity.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.extent.clipboard; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; -import static com.google.common.base.Preconditions.checkNotNull; - /** * An implementation of {@link Entity} that stores a {@link BaseEntity} with it. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java index c248a3ad8..016984032 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java @@ -20,7 +20,6 @@ package com.sk89q.worldedit.extent.clipboard.io; import com.sk89q.worldedit.extent.clipboard.Clipboard; -import com.sk89q.worldedit.world.registry.Registries; import java.io.Closeable; import java.io.IOException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java index d3f7840c0..424dffcc6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java @@ -60,4 +60,4 @@ public abstract class NBTSchematicReader implements ClipboardReader { return expected.cast(test); } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/NBTCompatibilityHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/NBTCompatibilityHandler.java index cf2e33f1f..16a60c80d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/NBTCompatibilityHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/NBTCompatibilityHandler.java @@ -20,8 +20,6 @@ package com.sk89q.worldedit.extent.clipboard.io.legacycompat; import com.sk89q.jnbt.Tag; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import java.util.Map; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/SignCompatibilityHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/SignCompatibilityHandler.java index 4851d5bee..ae2d5f055 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/SignCompatibilityHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/SignCompatibilityHandler.java @@ -26,8 +26,6 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSyntaxException; import com.sk89q.jnbt.StringTag; import com.sk89q.jnbt.Tag; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java index 3c0a1c8fc..a60fa79ec 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java @@ -33,8 +33,8 @@ import com.sk89q.worldedit.function.operation.RunContext; import com.sk89q.worldedit.registry.state.Property; import com.sk89q.worldedit.util.collection.TupleArrayList; import com.sk89q.worldedit.world.block.BlockCategories; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockState; +import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; import java.util.Deque; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/BlockChangeLimiter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/BlockChangeLimiter.java index da0fd9ecc..c3332a250 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/BlockChangeLimiter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/BlockChangeLimiter.java @@ -19,15 +19,14 @@ package com.sk89q.worldedit.extent.validation; +import static com.google.common.base.Preconditions.checkArgument; + import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; - -import static com.google.common.base.Preconditions.checkArgument; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Limits the number of blocks that can be changed before a diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/DataValidatorExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/DataValidatorExtent.java index 43c40429a..ffb2b175a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/DataValidatorExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/validation/DataValidatorExtent.java @@ -19,16 +19,15 @@ package com.sk89q.worldedit.extent.validation; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.world.World; - -import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockType; /** * Validates set data to prevent creating invalid blocks and such. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/BlockQuirkExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/BlockQuirkExtent.java index d98ba4172..25591defb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/BlockQuirkExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/BlockQuirkExtent.java @@ -23,13 +23,12 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockType; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.world.World; +import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockType; +import com.sk89q.worldedit.world.block.BlockTypes; /** * Handles various quirks when setting blocks, such as ice turning diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/ChunkLoadingExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/ChunkLoadingExtent.java index 6a2179099..845276a58 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/ChunkLoadingExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/ChunkLoadingExtent.java @@ -19,15 +19,14 @@ package com.sk89q.worldedit.extent.world; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.world.World; - -import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Automatically loads chunks when blocks are accessed. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java index 00af5970f..9ad839a32 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java @@ -19,22 +19,21 @@ package com.sk89q.worldedit.extent.world; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.BlockVector2D; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.function.operation.Operation; import com.sk89q.worldedit.function.operation.RunContext; import com.sk89q.worldedit.world.World; +import com.sk89q.worldedit.world.block.BlockStateHolder; import java.util.HashSet; import java.util.List; import java.util.Set; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Implements "fast mode" which may skip physics, lighting, etc. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/EditContext.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/EditContext.java index d9ee8c917..07c1515ba 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/EditContext.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/EditContext.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.function; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.Region; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; - public class EditContext { private Extent destination; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/FlatRegionMaskingFilter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/FlatRegionMaskingFilter.java index 35a9802e4..ff287632c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/FlatRegionMaskingFilter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/FlatRegionMaskingFilter.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.mask.Mask2D; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Passes calls to {@link #apply(com.sk89q.worldedit.Vector2D)} to the * delegate {@link com.sk89q.worldedit.function.FlatRegionFunction} if they diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/GroundFunction.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/GroundFunction.java index f45c5694d..2b14b57b2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/GroundFunction.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/GroundFunction.java @@ -19,13 +19,12 @@ package com.sk89q.worldedit.function; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.mask.Mask; - -import static com.google.common.base.Preconditions.checkNotNull; - /** * Applies a {@link RegionFunction} to the first ground block. */ @@ -38,7 +37,7 @@ public class GroundFunction implements LayerFunction { /** * Create a new ground function. * - * @param mask a mask + * @param mask a mask * @param function the function to apply */ public GroundFunction(Mask mask, RegionFunction function) { @@ -88,6 +87,7 @@ public class GroundFunction implements LayerFunction { affected++; } } + return false; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java index 1f773a188..673d411d2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/RegionMaskingFilter.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.mask.Mask; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Passes calls to {@link #apply(com.sk89q.worldedit.Vector)} to the * delegate {@link com.sk89q.worldedit.function.RegionFunction} if they diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/biome/BiomeReplace.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/biome/BiomeReplace.java index f877adce5..ac5fdf98d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/biome/BiomeReplace.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/biome/BiomeReplace.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.function.biome; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.FlatRegionFunction; import com.sk89q.worldedit.world.biome.BaseBiome; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Replaces the biome at the locations that this function is applied to. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java index 7ff183a37..324fe72f1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Apply.java @@ -19,6 +19,9 @@ package com.sk89q.worldedit.function.factory; +import static com.google.common.base.Preconditions.checkNotNull; +import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; + import com.sk89q.worldedit.function.Contextual; import com.sk89q.worldedit.function.EditContext; import com.sk89q.worldedit.function.RegionFunction; @@ -27,9 +30,6 @@ import com.sk89q.worldedit.function.visitor.RegionVisitor; import com.sk89q.worldedit.regions.NullRegion; import com.sk89q.worldedit.regions.Region; -import static com.google.common.base.Preconditions.checkNotNull; -import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; - public class Apply implements Contextual { private final Region region; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Deform.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Deform.java index f255050b7..d80ad4570 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Deform.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/factory/Deform.java @@ -19,6 +19,9 @@ package com.sk89q.worldedit.function.factory; +import static com.google.common.base.Preconditions.checkNotNull; +import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; + import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; @@ -34,9 +37,6 @@ import com.sk89q.worldedit.regions.Region; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; -import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull; - public class Deform implements Contextual { private Extent destination; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/FloraGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/FloraGenerator.java index 2729f8506..3f6265de7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/FloraGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/FloraGenerator.java @@ -22,12 +22,12 @@ package com.sk89q.worldedit.function.generator; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.function.RegionFunction; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.RandomPattern; +import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockTypes; /** * Generates flora (which may include tall grass, flowers, etc.). diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/ForestGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/ForestGenerator.java index a043e156a..4446ccf81 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/ForestGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/ForestGenerator.java @@ -22,11 +22,11 @@ package com.sk89q.worldedit.function.generator; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; +import com.sk89q.worldedit.function.RegionFunction; +import com.sk89q.worldedit.util.TreeGenerator; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import com.sk89q.worldedit.function.RegionFunction; -import com.sk89q.worldedit.util.TreeGenerator; /** * Generates forests by searching for the ground starting from the given upper Y diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/GardenPatchGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/GardenPatchGenerator.java index d6377db25..d6bba6356 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/GardenPatchGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/GardenPatchGenerator.java @@ -26,8 +26,8 @@ import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.RegionFunction; import com.sk89q.worldedit.function.pattern.BlockPattern; import com.sk89q.worldedit.function.pattern.Pattern; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockState; +import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; import java.util.Random; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractExtentMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractExtentMask.java index 1d6eab112..dbb3f28cc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractExtentMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractExtentMask.java @@ -58,4 +58,4 @@ public abstract class AbstractExtentMask extends AbstractMask { this.extent = extent; } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BiomeMask2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BiomeMask2D.java index b1d8be833..d7bf33c8a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BiomeMask2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BiomeMask2D.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.world.biome.BaseBiome; @@ -28,8 +30,6 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Tests true if the biome at applied points is the same as the one given. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BoundedHeightMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BoundedHeightMask.java index fe35ff1ef..3622926e3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BoundedHeightMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BoundedHeightMask.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkArgument; + import com.sk89q.worldedit.Vector; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkArgument; - /** * Has the criteria where the Y value of passed positions must be within * a certain range of Y values (inclusive). diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExistingBlockMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExistingBlockMask.java index 3c48fb770..e57a28b41 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExistingBlockMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExistingBlockMask.java @@ -19,8 +19,8 @@ package com.sk89q.worldedit.function.mask; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.extent.Extent; import javax.annotation.Nullable; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java index d1d1e374b..d662e0fa3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.internal.expression.Expression; import com.sk89q.worldedit.internal.expression.ExpressionException; @@ -27,8 +29,6 @@ import com.sk89q.worldedit.regions.shape.WorldEditExpressionEnvironment; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; - /** * A mask that evaluates an expression. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java index 52fc28c57..2b4031ca8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.internal.expression.Expression; import com.sk89q.worldedit.internal.expression.ExpressionException; import com.sk89q.worldedit.internal.expression.runtime.EvaluationException; -import static com.google.common.base.Preconditions.checkNotNull; - public class ExpressionMask2D extends AbstractMask2D { private final Expression expression; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/MaskIntersection2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/MaskIntersection2D.java index 75905f49f..07e43be38 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/MaskIntersection2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/MaskIntersection2D.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import java.util.Arrays; @@ -26,8 +28,6 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Tests true if all contained masks test true. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java index 61dd7b73a..04c793bde 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.math.noise.NoiseGenerator; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - /** * A mask that uses a noise generator and returns true whenever the noise * generator returns a value above the given density. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter2D.java index 6a2146c58..fdcbcd59b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter2D.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function.mask; -import com.sk89q.worldedit.Vector2D; -import com.sk89q.worldedit.math.noise.NoiseGenerator; - import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.Vector2D; +import com.sk89q.worldedit.math.noise.NoiseGenerator; + /** * A mask that uses a noise generator and returns true whenever the noise * generator returns a value above the given density. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask2D.java index 50d2835ba..74daead9d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/OffsetMask2D.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.function.mask; -import com.sk89q.worldedit.Vector2D; - import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.Vector2D; + /** * Checks whether another mask tests true for a position that is offset * a given vector. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/RegionMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/RegionMask.java index 1ddf891fe..7d2d78dfc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/RegionMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/RegionMask.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.function.mask; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.Region; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; - /** * A mask that tests whether given positions are contained within a region. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/DelegateOperation.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/DelegateOperation.java index 509b103c1..69560ec56 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/DelegateOperation.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/DelegateOperation.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function.operation; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.WorldEditException; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Executes a delegete operation, but returns to another operation upon * completing the delegate. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/OperationQueue.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/OperationQueue.java index f4b2a95d7..53e79fa3d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/OperationQueue.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/OperationQueue.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.function.operation; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.collect.Lists; import com.sk89q.worldedit.WorldEditException; @@ -27,8 +29,6 @@ import java.util.Collection; import java.util.Deque; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Executes multiple queues in order. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/FlatRegionOffset.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/FlatRegionOffset.java index c01e9bc9d..6a21a50c3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/FlatRegionOffset.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/FlatRegionOffset.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function.util; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.FlatRegionFunction; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Offsets the position parameter by adding a given offset vector. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/RegionOffset.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/RegionOffset.java index 4d5338eaf..c1f395be6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/RegionOffset.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/util/RegionOffset.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.function.util; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.function.RegionFunction; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Offsets the position parameter by adding a given offset vector. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/BlockChange.java b/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/BlockChange.java index a7534e8db..4bb94aa09 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/BlockChange.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/BlockChange.java @@ -19,14 +19,13 @@ package com.sk89q.worldedit.history.change; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.history.UndoContext; - -import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Represents a block change that may be undone or replayed. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/Change.java b/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/Change.java index f9f644fe1..006839291 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/Change.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/history/change/Change.java @@ -20,8 +20,8 @@ package com.sk89q.worldedit.history.change; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.history.changeset.ChangeSet; import com.sk89q.worldedit.history.UndoContext; +import com.sk89q.worldedit.history.changeset.ChangeSet; /** * Describes a change that can be undone or re-applied. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandLoggingHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandLoggingHandler.java index 71c9751e7..a6371961f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandLoggingHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandLoggingHandler.java @@ -19,10 +19,15 @@ package com.sk89q.worldedit.internal.command; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.minecraft.util.commands.CommandContext; import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.Logging; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.IncompleteRegionException; +import com.sk89q.worldedit.LocalSession; +import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.util.command.parametric.AbstractInvokeListener; @@ -35,8 +40,6 @@ import java.lang.reflect.Method; import java.util.logging.Handler; import java.util.logging.Logger; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Logs called commands to a logger. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/UserCommandCompleter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/UserCommandCompleter.java index 5e0bbdbb7..a93363295 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/UserCommandCompleter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/UserCommandCompleter.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.internal.command; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.extension.platform.Actor; @@ -33,8 +35,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Provides the names of connected users as suggestions. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/parser/ParserProcessors.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/parser/ParserProcessors.java index d1810bc9f..b50997cc6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/parser/ParserProcessors.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/parser/ParserProcessors.java @@ -26,7 +26,11 @@ import com.sk89q.worldedit.internal.expression.runtime.Conditional; import com.sk89q.worldedit.internal.expression.runtime.Operators; import com.sk89q.worldedit.internal.expression.runtime.RValue; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Map; /** * Helper classfor Parser. Contains processors for statements and operators. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/ExpressionEnvironment.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/ExpressionEnvironment.java index 17afffd7d..1a9a57d4a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/ExpressionEnvironment.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/ExpressionEnvironment.java @@ -19,9 +19,6 @@ package com.sk89q.worldedit.internal.expression.runtime; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; - /** * Represents a way to access blocks in a world. Has to accept non-rounded coordinates. */ @@ -34,5 +31,4 @@ public interface ExpressionEnvironment { int getBlockTypeRel(double x, double y, double z); int getBlockDataRel(double x, double y, double z); - } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/SimpleFor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/SimpleFor.java index 6f1282aba..0faf0c3eb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/SimpleFor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/SimpleFor.java @@ -100,4 +100,5 @@ public class SimpleFor extends Node { return this; } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/While.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/While.java index d6707e324..5eb3ed5f6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/While.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/runtime/While.java @@ -129,4 +129,5 @@ public class While extends Node { return this; } + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/AbstractFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/AbstractFactory.java index 4f4f36ea6..506663a81 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/AbstractFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/AbstractFactory.java @@ -19,16 +19,16 @@ package com.sk89q.worldedit.internal.registry; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.NoMatchException; +import com.sk89q.worldedit.extension.input.ParserContext; import java.util.ArrayList; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * An abstract implementation of a factory for internal usage. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/InputParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/InputParser.java index 059c95ba4..77c05c2e3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/InputParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/registry/InputParser.java @@ -20,8 +20,8 @@ package com.sk89q.worldedit.internal.registry; import com.sk89q.worldedit.WorldEdit; -import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.input.InputParseException; +import com.sk89q.worldedit.extension.input.ParserContext; /** * Input parser interface for {@link AbstractFactory}. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/LinearInterpolation.java b/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/LinearInterpolation.java index 00fa7c12f..ea1962119 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/LinearInterpolation.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/LinearInterpolation.java @@ -21,12 +21,12 @@ package com.sk89q.worldedit.math.interpolation; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Simple linear interpolation. Mainly used for testing. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/ReparametrisingInterpolation.java b/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/ReparametrisingInterpolation.java index 7b67c6a86..d6920b829 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/ReparametrisingInterpolation.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/math/interpolation/ReparametrisingInterpolation.java @@ -21,6 +21,8 @@ package com.sk89q.worldedit.math.interpolation; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import java.util.List; @@ -28,8 +30,6 @@ import java.util.Map.Entry; import java.util.TreeMap; import java.util.logging.Logger; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Reparametrises another interpolation function by arc length. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/CombinedTransform.java b/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/CombinedTransform.java index 46cd72177..646e2a209 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/CombinedTransform.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/CombinedTransform.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.math.transform; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import java.util.ArrayList; @@ -26,8 +28,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Combines several transforms in order. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/Transforms.java b/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/Transforms.java index 71286507b..5d0412259 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/Transforms.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/math/transform/Transforms.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.math.transform; -import com.sk89q.worldedit.util.Location; - import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.util.Location; + /** * Various utility methods related to {@link Transform}s. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/TransformRegion.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/TransformRegion.java index cff94d8cd..338d5f0e9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/TransformRegion.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/TransformRegion.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.regions; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.BlockVector2D; import com.sk89q.worldedit.Vector; @@ -26,12 +28,11 @@ import com.sk89q.worldedit.math.transform.Identity; import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.world.World; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; /** * Transforms another region according to a provided vector {@code Transform}. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegion3DIterator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegion3DIterator.java index 7cfeff11e..8c6628616 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegion3DIterator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegion3DIterator.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.regions.iterator; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.regions.FlatRegion; @@ -26,8 +28,6 @@ import com.sk89q.worldedit.regions.FlatRegion; import java.util.Iterator; import java.util.NoSuchElementException; -import static com.google.common.base.Preconditions.checkNotNull; - public class FlatRegion3DIterator implements Iterator { private Iterator flatIterator; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegionIterator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegionIterator.java index 803ce55a5..c798e82a7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegionIterator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/FlatRegionIterator.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.regions.iterator; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.regions.Region; import java.util.Iterator; -import static com.google.common.base.Preconditions.checkNotNull; - public class FlatRegionIterator implements Iterator { private Region region; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/RegionIterator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/RegionIterator.java index 9d3b4542d..35700595c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/RegionIterator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/iterator/RegionIterator.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.regions.iterator; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.Region; import java.util.Iterator; -import static com.google.common.base.Preconditions.checkNotNull; - public class RegionIterator implements Iterator { private final Region region; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Edge.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Edge.java index 875af7659..3495fee83 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Edge.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Edge.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.regions.polyhedron; -import com.sk89q.worldedit.Vector; - import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.Vector; + public class Edge { private final Vector start; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Triangle.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Triangle.java index ed1ee46c8..01bd7f8ae 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Triangle.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/polyhedron/Triangle.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.regions.polyhedron; -import com.sk89q.worldedit.Vector; - import static com.google.common.base.Preconditions.checkNotNull; +import com.sk89q.worldedit.Vector; + public class Triangle { private String tag = "Triangle"; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java index 41ee319da..07f8c258b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java @@ -27,6 +27,7 @@ import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.selector.limit.SelectorLimits; import com.sk89q.worldedit.world.World; + import javax.annotation.Nullable; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java index 14dace6bf..573e35eb3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java @@ -26,6 +26,7 @@ import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.selector.limit.SelectorLimits; import com.sk89q.worldedit.world.World; + import javax.annotation.Nullable; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/ArbitraryShape.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/ArbitraryShape.java index 30b1aaecd..7629637d4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/ArbitraryShape.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/ArbitraryShape.java @@ -22,10 +22,9 @@ package com.sk89q.worldedit.regions.shape; import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Generates solid and hollow shapes according to materials returned by the @@ -93,4 +92,4 @@ public abstract class ArbitraryShape { return affected; } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/RegionShape.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/RegionShape.java index c1119246f..e8419cf00 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/RegionShape.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/RegionShape.java @@ -20,9 +20,8 @@ package com.sk89q.worldedit.regions.shape; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.world.block.BlockStateHolder; /** * Generates solid and hollow shapes according to materials returned by the diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptEngine.java b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptEngine.java index c5423aa88..8f946800f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptEngine.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptEngine.java @@ -20,6 +20,7 @@ package com.sk89q.worldedit.scripting; import java.util.Map; + import javax.script.ScriptException; public interface CraftScriptEngine { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java index 7f3354bbc..79d51cefb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/RhinoCraftScriptEngine.java @@ -19,8 +19,7 @@ package com.sk89q.worldedit.scripting; -import java.util.Map; -import javax.script.ScriptException; +import com.sk89q.worldedit.WorldEditException; import org.mozilla.javascript.Context; import org.mozilla.javascript.ImporterTopLevel; import org.mozilla.javascript.JavaScriptException; @@ -29,7 +28,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; import org.mozilla.javascript.WrappedException; -import com.sk89q.worldedit.WorldEditException; +import java.util.Map; + +import javax.script.ScriptException; public class RhinoCraftScriptEngine implements CraftScriptEngine { private int timeLimit; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngineFactory.java b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngineFactory.java index 89cca721e..ee312229c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngineFactory.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/scripting/java/RhinoScriptEngineFactory.java @@ -22,6 +22,7 @@ package com.sk89q.worldedit.scripting.java; import java.util.ArrayList; import java.util.Collections; import java.util.List; + import javax.script.ScriptEngine; import javax.script.ScriptEngineFactory; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/session/request/RequestSelection.java b/worldedit-core/src/main/java/com/sk89q/worldedit/session/request/RequestSelection.java index b6392f093..72ae6ef2b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/session/request/RequestSelection.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/session/request/RequestSelection.java @@ -19,7 +19,12 @@ package com.sk89q.worldedit.session.request; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.BlockVector; +import com.sk89q.worldedit.BlockVector2D; +import com.sk89q.worldedit.IncompleteRegionException; +import com.sk89q.worldedit.LocalSession; +import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.regions.NullRegion; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionOperationException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/session/storage/JsonFileSessionStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/session/storage/JsonFileSessionStore.java index 962ae4426..d7b2a9893 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/session/storage/JsonFileSessionStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/session/storage/JsonFileSessionStore.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.session.storage; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonIOException; @@ -38,8 +40,6 @@ import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Stores sessions as JSON files in a directory. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Enums.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Enums.java index 9f397c127..7e9160eb0 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Enums.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Enums.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.util; -import javax.annotation.Nullable; - import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; + /** * Helper methods for enums. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java index 927692140..b44850ca7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/FileDialogUtil.java @@ -21,13 +21,14 @@ package com.sk89q.worldedit.util; import com.sk89q.util.StringUtil; -import javax.swing.*; -import javax.swing.filechooser.FileFilter; import java.io.File; import java.util.Arrays; import java.util.HashSet; import java.util.Set; +import javax.swing.JFileChooser; +import javax.swing.filechooser.FileFilter; + public final class FileDialogUtil { private FileDialogUtil() { } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/GuavaUtil.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/GuavaUtil.java index 1e6fddbfa..861858aed 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/GuavaUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/GuavaUtil.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.util; -import javax.annotation.Nullable; - import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; + public final class GuavaUtil { private GuavaUtil() {} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java index d63ef2f29..13988a89a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java @@ -23,8 +23,8 @@ import com.google.common.collect.Sets; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockState; +import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; import java.util.Collections; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/DoubleArrayList.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/DoubleArrayList.java index d3bf38793..70c233704 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/DoubleArrayList.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/DoubleArrayList.java @@ -19,11 +19,11 @@ package com.sk89q.worldedit.util.collection; -import java.util.List; import java.util.ArrayList; -import java.util.Map; import java.util.Iterator; +import java.util.List; import java.util.ListIterator; +import java.util.Map; import java.util.NoSuchElementException; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/FastListIterator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/FastListIterator.java index 75aea6b29..3182502f6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/FastListIterator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/FastListIterator.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.util.collection; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - /** * A fast iterator for lists that uses an internal index integer * and caches the size of the list. The size of the list cannot change diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/Dispatcher.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/Dispatcher.java index 568db508e..a7f1405f8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/Dispatcher.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/Dispatcher.java @@ -19,10 +19,11 @@ package com.sk89q.worldedit.util.command; -import javax.annotation.Nullable; import java.util.Collection; import java.util.Set; +import javax.annotation.Nullable; + /** * Executes a command based on user input. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/InvalidUsageException.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/InvalidUsageException.java index f121a2fe8..0ffbc4c1e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/InvalidUsageException.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/InvalidUsageException.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.util.command; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.minecraft.util.commands.CommandException; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Thrown when a command is not used properly. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/PrimaryAliasComparator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/PrimaryAliasComparator.java index b7b980acf..bca779d4b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/PrimaryAliasComparator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/PrimaryAliasComparator.java @@ -19,10 +19,11 @@ package com.sk89q.worldedit.util.command; -import javax.annotation.Nullable; import java.util.Comparator; import java.util.regex.Pattern; +import javax.annotation.Nullable; + /** * Compares the primary aliases of two {@link CommandMapping} using * {@link String#compareTo(String)}. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/binding/PrimitiveBindings.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/binding/PrimitiveBindings.java index a26a195d4..3a4d78edf 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/binding/PrimitiveBindings.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/binding/PrimitiveBindings.java @@ -28,9 +28,10 @@ import com.sk89q.worldedit.util.command.parametric.BindingHelper; import com.sk89q.worldedit.util.command.parametric.BindingMatch; import com.sk89q.worldedit.util.command.parametric.ParameterException; -import javax.annotation.Nullable; import java.lang.annotation.Annotation; +import javax.annotation.Nullable; + /** * Handles basic Java types such as {@link String}s, {@link Byte}s, etc. * @@ -86,8 +87,8 @@ public final class PrimitiveBindings extends BindingHelper { * @throws ParameterException on error */ @BindingMatch(type = { Boolean.class, boolean.class }, - behavior = BindingBehavior.CONSUMES, - consumedCount = 1) + behavior = BindingBehavior.CONSUMES, + consumedCount = 1) public Boolean getBoolean(ArgumentStack context) throws ParameterException { return context.nextBoolean(); } @@ -117,6 +118,7 @@ public final class PrimitiveBindings extends BindingHelper { throw new ParameterException(String.format( "Expected '%s' to be a number or valid math expression (error: %s)", input, e.getMessage())); } + } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/composition/FlagParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/composition/FlagParser.java index 2309adb53..479a62d6f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/composition/FlagParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/composition/FlagParser.java @@ -25,15 +25,16 @@ import com.google.common.collect.Maps; import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandLocals; import com.sk89q.worldedit.util.command.argument.CommandArgs; -import com.sk89q.worldedit.util.command.composition.FlagParser.FlagData; import com.sk89q.worldedit.util.command.argument.MissingArgumentException; +import com.sk89q.worldedit.util.command.composition.FlagParser.FlagData; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import javax.annotation.Nullable; + public class FlagParser implements CommandExecutor { private final Map> flags = Maps.newHashMap(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/EventHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/EventHandler.java index 6488af945..aaafb4dc8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/EventHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/EventHandler.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.util.eventbus; -import java.lang.reflect.InvocationTargetException; - import static com.google.common.base.Preconditions.checkNotNull; +import java.lang.reflect.InvocationTargetException; + /** * Event handler object for {@link EventBus} that is able to dispatch * an event. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/HierarchyCache.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/HierarchyCache.java index 5644e2aa3..92f1cb56b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/HierarchyCache.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/HierarchyCache.java @@ -23,7 +23,11 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.sk89q.worldedit.internal.annotation.RequiresNewerGuava; -import java.util.*; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.WeakHashMap; /** * Holds a cache of class hierarchy. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java index a0575e83f..1d825927e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/MethodEventHandler.java @@ -19,10 +19,10 @@ package com.sk89q.worldedit.util.eventbus; -import java.lang.reflect.Method; - import static com.google.common.base.Preconditions.checkNotNull; +import java.lang.reflect.Method; + /** * Invokes a {@link Method} to dispatch an event. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/Subscribe.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/Subscribe.java index 6616ea65e..88b3222ee 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/Subscribe.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/eventbus/Subscribe.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.util.eventbus; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + import java.lang.annotation.Retention; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.*; - /** * Used to mark methods as event handlers. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Fragment.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Fragment.java index 4720cb41c..f7034093e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Fragment.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Fragment.java @@ -25,7 +25,7 @@ package com.sk89q.worldedit.util.formatting; public class Fragment { private final StringBuilder builder = new StringBuilder(); - + public Fragment() { } @@ -88,6 +88,5 @@ public class Fragment { public String toString() { return builder.toString(); } - - + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Style.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Style.java index 856b03514..f705bb99a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Style.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/Style.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit.util.formatting; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.collect.Maps; import java.util.Map; import java.util.regex.Pattern; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - /** * All supported color values for chat. * diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/function/LevenshteinDistance.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/function/LevenshteinDistance.java index 723db8123..1020d92cd 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/function/LevenshteinDistance.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/function/LevenshteinDistance.java @@ -19,12 +19,13 @@ package com.sk89q.worldedit.util.function; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.base.Function; -import javax.annotation.Nullable; import java.util.regex.Pattern; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; /** * Provides a Levenshtein distance between a given string and each string diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/io/Closer.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/io/Closer.java index 76bf1a908..26ef6a0f9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/io/Closer.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/io/Closer.java @@ -19,6 +19,8 @@ package com.sk89q.worldedit.util.io; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; @@ -31,8 +33,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.ZipFile; -import static com.google.common.base.Preconditions.checkNotNull; - public final class Closer implements Closeable { private static final Logger logger = Logger.getLogger(Closer.class.getCanonicalName()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/logging/LogFormat.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/logging/LogFormat.java index 05a4c8378..d48b3d89a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/logging/LogFormat.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/logging/LogFormat.java @@ -19,11 +19,11 @@ package com.sk89q.worldedit.util.logging; +import java.io.PrintWriter; +import java.io.StringWriter; import java.util.Date; import java.util.logging.Formatter; import java.util.logging.LogRecord; -import java.io.PrintWriter; -import java.io.StringWriter; /** * A standard logging format for WorldEdit. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java index 1063454f2..ed0234e6c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java @@ -26,15 +26,14 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.blocks.BaseItem; import com.sk89q.worldedit.blocks.BaseItemStack; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.extension.platform.Platform; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.util.Direction; import com.sk89q.worldedit.util.TreeGenerator; +import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.weather.WeatherType; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BaseBiome.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BaseBiome.java index 8bb7d977c..5bf051706 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BaseBiome.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BaseBiome.java @@ -84,7 +84,4 @@ public class BaseBiome { public int hashCode() { return id; } - - - } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BiomeName.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BiomeName.java index 145d891cb..45018ed41 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BiomeName.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BiomeName.java @@ -19,13 +19,13 @@ package com.sk89q.worldedit.world.biome; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.base.Function; import com.sk89q.worldedit.world.registry.BiomeRegistry; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Returns the name of a biome using a given {@code BiomeRegistry}. */ 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 09c7440d4..2f261570e 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 @@ -36,4 +36,5 @@ public interface Chunk { * @throws DataException thrown on data error */ BlockStateHolder getBlock(Vector position) throws DataException; + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BiomeRegistry.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BiomeRegistry.java index b734298f3..8a581b7a6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BiomeRegistry.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BiomeRegistry.java @@ -22,9 +22,10 @@ package com.sk89q.worldedit.world.registry; import com.sk89q.worldedit.world.biome.BaseBiome; import com.sk89q.worldedit.world.biome.BiomeData; -import javax.annotation.Nullable; import java.util.List; +import javax.annotation.Nullable; + /** * Provides information on biomes. */ @@ -54,4 +55,5 @@ public interface BiomeRegistry { */ @Nullable BiomeData getData(BaseBiome biome); + } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockRegistry.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockRegistry.java index 53948f3b6..40e123959 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockRegistry.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockRegistry.java @@ -19,7 +19,6 @@ package com.sk89q.worldedit.world.registry; -import com.sk89q.worldedit.blocks.BlockMaterial; import com.sk89q.worldedit.registry.state.Property; import com.sk89q.worldedit.world.block.BlockType; @@ -46,4 +45,4 @@ public class BundledBlockRegistry implements BlockRegistry { return Collections.emptyMap(); // Oof } -} \ No newline at end of file +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBiomeRegistry.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBiomeRegistry.java index 8bbf7c1ff..551cbc039 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBiomeRegistry.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBiomeRegistry.java @@ -22,10 +22,11 @@ package com.sk89q.worldedit.world.registry; import com.sk89q.worldedit.world.biome.BaseBiome; import com.sk89q.worldedit.world.biome.BiomeData; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; +import javax.annotation.Nullable; + /** * A biome registry that knows nothing. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/Snapshot.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/Snapshot.java index 77f47ceed..d3ca0c251 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/Snapshot.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/Snapshot.java @@ -22,7 +22,14 @@ package com.sk89q.worldedit.world.snapshot; import com.sk89q.worldedit.world.DataException; -import com.sk89q.worldedit.world.storage.*; +import com.sk89q.worldedit.world.storage.ChunkStore; +import com.sk89q.worldedit.world.storage.FileLegacyChunkStore; +import com.sk89q.worldedit.world.storage.FileMcRegionChunkStore; +import com.sk89q.worldedit.world.storage.TrueZipLegacyChunkStore; +import com.sk89q.worldedit.world.storage.TrueZipMcRegionChunkStore; +import com.sk89q.worldedit.world.storage.ZippedLegacyChunkStore; +import com.sk89q.worldedit.world.storage.ZippedMcRegionChunkStore; + import java.io.File; import java.io.IOException; import java.util.Calendar; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotDateParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotDateParser.java index df026e34c..323bef842 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotDateParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotDateParser.java @@ -19,10 +19,11 @@ package com.sk89q.worldedit.world.snapshot; -import javax.annotation.Nullable; import java.io.File; import java.util.Calendar; +import javax.annotation.Nullable; + /** * A name parser attempts to make sense of a filename for a snapshot. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRepository.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRepository.java index 2add97ec8..72650a408 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRepository.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotRepository.java @@ -23,7 +23,6 @@ package com.sk89q.worldedit.world.snapshot; import com.sk89q.worldedit.world.storage.MissingWorldException; -import javax.annotation.Nullable; import java.io.File; import java.io.FilenameFilter; import java.util.ArrayList; @@ -31,6 +30,8 @@ import java.util.Calendar; import java.util.Collections; import java.util.List; +import javax.annotation.Nullable; + /** * A repository contains zero or more snapshots. */ 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 4d4a19939..a7ef7ca9d 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 @@ -24,16 +24,13 @@ import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; +import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.world.DataException; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.chunk.Chunk; import com.sk89q.worldedit.world.storage.ChunkStore; import com.sk89q.worldedit.world.storage.MissingChunkException; -import com.sk89q.worldedit.world.storage.MissingWorldException; import java.io.IOException; import java.util.ArrayList; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/LegacyChunkStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/LegacyChunkStore.java index d7212e066..0bdf4c6da 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/LegacyChunkStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/LegacyChunkStore.java @@ -22,7 +22,7 @@ package com.sk89q.worldedit.world.storage; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.NBTInputStream; import com.sk89q.jnbt.Tag; -import com.sk89q.worldedit.*; +import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.world.DataException; import com.sk89q.worldedit.world.World; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/NBTConversions.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/NBTConversions.java index ad10929ae..6b61bddf9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/NBTConversions.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/NBTConversions.java @@ -19,12 +19,12 @@ package com.sk89q.worldedit.world.storage; +import static com.google.common.base.Preconditions.checkNotNull; + import com.sk89q.jnbt.ListTag; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Utility methods for working with NBT data used in Minecraft. */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedLegacyChunkStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedLegacyChunkStore.java index 155d65c51..19350d831 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedLegacyChunkStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedLegacyChunkStore.java @@ -24,11 +24,11 @@ import com.sk89q.worldedit.world.DataException; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.util.Enumeration; import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; -import java.util.Enumeration; /** * Represents the chunk store used by Minecraft alpha but zipped. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedMcRegionChunkStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedMcRegionChunkStore.java index 95356f445..581686ea4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedMcRegionChunkStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ZippedMcRegionChunkStore.java @@ -26,11 +26,11 @@ import com.sk89q.worldedit.world.DataException; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.util.Enumeration; import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; -import java.util.Enumeration; /** * Represents the chunk store used by Minecraft alpha but zipped. diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/VectorTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/VectorTest.java index fea68dbf0..51d50f93b 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/VectorTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/VectorTest.java @@ -19,8 +19,10 @@ package com.sk89q.worldedit; -import org.junit.*; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; public class VectorTest { @Test 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 1acdbc892..b7944d476 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 @@ -19,13 +19,13 @@ package com.sk89q.worldedit.util; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; + import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.world.World; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.mock; - /** * Tests {@link Location}. */