From 61cba3ce072b9d1fea9934e8c9bbf0f02cba9d54 Mon Sep 17 00:00:00 2001 From: Wyatt Childers Date: Tue, 2 Feb 2016 19:28:05 -0500 Subject: [PATCH] Import cleanup --- .../sk89q/worldedit/sponge/CommandAdapter.java | 3 --- .../sk89q/worldedit/sponge/SpongeAdapter.java | 3 --- .../worldedit/sponge/SpongeBiomeRegistry.java | 2 -- .../worldedit/sponge/SpongeForgeWorld.java | 17 +++++------------ .../sk89q/worldedit/sponge/SpongePlatform.java | 11 ----------- .../sk89q/worldedit/sponge/SpongePlayer.java | 3 --- .../com/sk89q/worldedit/sponge/SpongeWorld.java | 15 ++++++++------- .../sk89q/worldedit/sponge/SpongeWorldEdit.java | 14 ++++++-------- .../sk89q/worldedit/sponge/ThreadSafeCache.java | 6 ------ .../sk89q/worldedit/sponge/TileEntityUtils.java | 2 -- 10 files changed, 19 insertions(+), 57 deletions(-) diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/CommandAdapter.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/CommandAdapter.java index 00cfdd1c0..1398ba389 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/CommandAdapter.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/CommandAdapter.java @@ -21,12 +21,9 @@ package com.sk89q.worldedit.sponge; import com.sk89q.worldedit.util.command.CommandMapping; import org.spongepowered.api.command.CommandCallable; -import org.spongepowered.api.command.CommandException; -import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.text.Text; -import java.util.List; import java.util.Optional; public abstract class CommandAdapter implements CommandCallable { diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeAdapter.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeAdapter.java index 3d9c756d6..b1eb2ebb2 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeAdapter.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeAdapter.java @@ -20,11 +20,8 @@ package com.sk89q.worldedit.sponge; import com.flowpowered.math.vector.Vector3d; -import com.flowpowered.math.vector.Vector3i; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; -import com.sk89q.worldedit.world.NullWorld; import com.sk89q.worldedit.world.World; final class SpongeAdapter { diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeBiomeRegistry.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeBiomeRegistry.java index 5bf2ef088..d65c59f2b 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeBiomeRegistry.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeBiomeRegistry.java @@ -22,12 +22,10 @@ package com.sk89q.worldedit.sponge; import com.sk89q.worldedit.world.biome.BaseBiome; import com.sk89q.worldedit.world.biome.BiomeData; import com.sk89q.worldedit.world.registry.BiomeRegistry; - import org.spongepowered.api.Sponge; import org.spongepowered.api.world.biome.BiomeType; import javax.annotation.Nullable; - import java.util.ArrayList; import java.util.List; diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeForgeWorld.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeForgeWorld.java index 40a6d41d2..00c12c60a 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeForgeWorld.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeForgeWorld.java @@ -21,15 +21,16 @@ package com.sk89q.worldedit.sponge; import com.flowpowered.math.vector.Vector3d; import com.flowpowered.math.vector.Vector3i; -import com.sk89q.jnbt.CompoundTag; -import com.sk89q.worldedit.*; +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.blocks.LazyBlock; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.internal.Constants; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.util.*; +import com.sk89q.worldedit.util.TreeGenerator; import net.minecraft.block.*; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; @@ -38,7 +39,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.ChunkProviderServer; @@ -48,22 +48,15 @@ import org.spongepowered.api.block.BlockSnapshot; import org.spongepowered.api.block.BlockState; import org.spongepowered.api.entity.EntitySnapshot; import org.spongepowered.api.entity.EntityType; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.text.channel.MessageChannel; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; -import org.spongepowered.common.block.SpongeBlockSnapshot; import org.spongepowered.common.block.SpongeBlockSnapshotBuilder; -import org.spongepowered.common.entity.SpongeEntitySnapshot; import org.spongepowered.common.entity.SpongeEntitySnapshotBuilder; -import scala.xml.Null; import javax.annotation.Nullable; -import java.util.*; +import java.util.Set; import java.util.logging.Level; -import static com.google.common.base.Preconditions.checkNotNull; - public class SpongeForgeWorld extends SpongeWorld { private final SpongeBlockSnapshotBuilder blockBuilder = new SpongeBlockSnapshotBuilder(); diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlatform.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlatform.java index 746077905..c8cb19f5e 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlatform.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlatform.java @@ -19,13 +19,6 @@ package com.sk89q.worldedit.sponge; -import com.google.common.base.Joiner; -import com.google.common.collect.Lists; -import com.sk89q.minecraft.util.commands.CommandException; -import com.sk89q.minecraft.util.commands.CommandLocals; -import com.sk89q.worldedit.EditSession; -import com.sk89q.worldedit.LocalConfiguration; -import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.event.platform.CommandEvent; @@ -33,17 +26,13 @@ import com.sk89q.worldedit.event.platform.CommandSuggestionEvent; import com.sk89q.worldedit.extension.platform.*; import com.sk89q.worldedit.util.command.CommandMapping; import com.sk89q.worldedit.util.command.Dispatcher; -import com.sk89q.worldedit.util.command.InvalidUsageException; import com.sk89q.worldedit.world.World; -import net.minecraft.entity.player.EntityPlayerMP; import org.spongepowered.api.Sponge; import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.entity.EntityType; import org.spongepowered.api.item.ItemType; import org.spongepowered.api.scheduler.Task; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.text.format.TextColors; import javax.annotation.Nullable; import java.util.*; diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java index d2086533b..3a11c8bb8 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java @@ -30,8 +30,6 @@ import com.sk89q.worldedit.internal.LocalWorldAdapter; import com.sk89q.worldedit.internal.cui.CUIEvent; import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.util.Location; - -import org.spongepowered.api.Sponge; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.text.Text; @@ -40,7 +38,6 @@ import org.spongepowered.api.text.format.TextColors; import org.spongepowered.api.world.World; import javax.annotation.Nullable; - import java.util.Optional; import java.util.UUID; diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorld.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorld.java index 1b22ccf80..f615b5239 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorld.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorld.java @@ -33,11 +33,6 @@ import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.AbstractWorld; import com.sk89q.worldedit.world.biome.BaseBiome; import com.sk89q.worldedit.world.registry.WorldData; - -import java.lang.ref.WeakReference; -import java.util.*; -import java.util.logging.Logger; -import javax.annotation.Nullable; import org.spongepowered.api.block.BlockSnapshot; import org.spongepowered.api.block.BlockState; import org.spongepowered.api.data.key.Keys; @@ -46,10 +41,16 @@ import org.spongepowered.api.data.property.block.SkyLuminanceProperty; import org.spongepowered.api.entity.EntitySnapshot; import org.spongepowered.api.entity.EntityTypes; import org.spongepowered.api.event.cause.Cause; -import org.spongepowered.api.text.Text; -import org.spongepowered.api.text.channel.MessageChannel; import org.spongepowered.api.world.World; +import javax.annotation.Nullable; +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.Random; +import java.util.logging.Logger; + import static com.google.common.base.Preconditions.checkNotNull; /** diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java index 418a4aff1..64072acfb 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java @@ -20,21 +20,14 @@ package com.sk89q.worldedit.sponge; import com.google.inject.Inject; -import com.sk89q.worldedit.extension.platform.Actor; - import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.event.platform.PlatformReadyEvent; +import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Platform; import com.sk89q.worldedit.internal.LocalWorldAdapter; - -import java.io.File; -import java.nio.file.Path; -import java.util.Optional; -import java.util.concurrent.TimeUnit; - import org.spongepowered.api.Sponge; import org.spongepowered.api.block.BlockSnapshot; import org.spongepowered.api.block.BlockType; @@ -52,6 +45,11 @@ import org.spongepowered.api.scheduler.Task; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; +import java.io.File; +import java.nio.file.Path; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + import static com.google.common.base.Preconditions.checkNotNull; /** diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/ThreadSafeCache.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/ThreadSafeCache.java index b0e42a7b3..f273b972c 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/ThreadSafeCache.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/ThreadSafeCache.java @@ -19,14 +19,8 @@ package com.sk89q.worldedit.sponge; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; import org.spongepowered.api.Sponge; import org.spongepowered.api.entity.living.player.Player; -import org.spongepowered.api.event.Listener; import java.util.Collections; import java.util.HashSet; diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/TileEntityUtils.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/TileEntityUtils.java index 2be2092d0..3c9f3d587 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/TileEntityUtils.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/TileEntityUtils.java @@ -20,7 +20,6 @@ package com.sk89q.worldedit.sponge; import com.sk89q.worldedit.Vector; - import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagInt; import net.minecraft.tileentity.TileEntity; @@ -28,7 +27,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import javax.annotation.Nullable; - import java.lang.reflect.Constructor; import static com.google.common.base.Preconditions.checkNotNull;