diff --git a/checkstyle.xml b/checkstyle.xml index eb51bc2b86..04aea5f7cb 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -19,8 +19,21 @@ - + + + + + + + + + diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index dd03441acc..c9380a3f14 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -3,18 +3,30 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; import java.lang.ref.WeakReference; import java.util.Arrays; - -import java.util.Random; -import net.minecraft.server.*; - +import net.minecraft.server.BiomeBase; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.Blocks; +import net.minecraft.server.ChunkSection; +import net.minecraft.server.DataPaletteBlock; +import net.minecraft.server.EnumSkyBlock; +import net.minecraft.server.GameProfileSerializer; +import net.minecraft.server.HeightMap; +import net.minecraft.server.IBlockData; +import net.minecraft.server.LightEngine; +import net.minecraft.server.NBTTagCompound; +import net.minecraft.server.NibbleArray; +import net.minecraft.server.SectionPosition; +import net.minecraft.server.SeededRandom; +import net.minecraft.server.WorldChunkManager; +import net.minecraft.server.WorldServer; import org.bukkit.Chunk; +import org.bukkit.ChunkSnapshot; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.block.CraftBlock; -import org.bukkit.entity.Entity; -import org.bukkit.ChunkSnapshot; import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.entity.Entity; public class CraftChunk implements Chunk { private WeakReference weakChunk; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java index f3be8c202e..2815a76e7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java @@ -1,6 +1,9 @@ package org.bukkit.craftbukkit; -import com.google.common.base.Preconditions; +import net.minecraft.server.BiomeBase; +import net.minecraft.server.DataPaletteBlock; +import net.minecraft.server.HeightMap; +import net.minecraft.server.IBlockData; import org.bukkit.ChunkSnapshot; import org.bukkit.Material; import org.bukkit.block.Biome; @@ -9,11 +12,6 @@ import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.util.CraftMagicNumbers; -import net.minecraft.server.BiomeBase; -import net.minecraft.server.DataPaletteBlock; -import net.minecraft.server.HeightMap; -import net.minecraft.server.IBlockData; - /** * Represents a static, thread-safe snapshot of chunk of blocks * Purpose is to allow clean, efficient copy of a chunk data to be made, and then handed off for processing in another thread (e.g. map rendering) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java index 921a57f5a6..2e89af053d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java @@ -4,16 +4,13 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.Arrays; import java.util.Map; -import java.util.concurrent.Callable; import net.minecraft.server.CrashReportCallable; - +import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; -import net.minecraft.server.MinecraftServer; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; - public class CraftCrashReport implements CrashReportCallable { public Object call() throws Exception { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java b/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java index 4cbc492f3d..5a51d6abd1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit; -import org.bukkit.FluidCollisionMode; import net.minecraft.server.RayTrace.FluidCollisionOption; +import org.bukkit.FluidCollisionMode; public class CraftFluidCollisionMode { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java index 7a8ea3bd02..372404cd18 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java @@ -1,12 +1,10 @@ package org.bukkit.craftbukkit; -import net.minecraft.server.IpBanEntry; -import net.minecraft.server.IpBanList; -import net.minecraft.server.MinecraftServer; - import java.io.IOException; import java.util.Date; import java.util.logging.Level; +import net.minecraft.server.IpBanEntry; +import net.minecraft.server.IpBanList; import org.bukkit.Bukkit; public final class CraftIpBanEntry implements org.bukkit.BanEntry { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java index 80832f78ae..101a32555a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java @@ -1,18 +1,15 @@ package org.bukkit.craftbukkit; +import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.net.InetSocketAddress; import java.util.Date; import java.util.Set; - +import java.util.logging.Level; import net.minecraft.server.IpBanEntry; import net.minecraft.server.IpBanList; -import net.minecraft.server.MinecraftServer; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; - -import com.google.common.collect.ImmutableSet; -import java.util.logging.Level; import org.bukkit.Bukkit; public class CraftIpBanList implements org.bukkit.BanList { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 698cfb918b..24b06a0b7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -6,12 +6,10 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.UUID; - import net.minecraft.server.DimensionManager; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.WhiteListEntry; import net.minecraft.server.WorldNBTStorage; - import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java index 3c6f9229f3..bbe91bca15 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java @@ -1,13 +1,11 @@ package org.bukkit.craftbukkit; import com.mojang.authlib.GameProfile; -import net.minecraft.server.GameProfileBanEntry; -import net.minecraft.server.GameProfileBanList; -import net.minecraft.server.MinecraftServer; - import java.io.IOException; import java.util.Date; import java.util.logging.Level; +import net.minecraft.server.GameProfileBanEntry; +import net.minecraft.server.GameProfileBanList; import org.bukkit.Bukkit; public final class CraftProfileBanEntry implements org.bukkit.BanEntry { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java index a0f8a2da14..fd6e4e963b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java @@ -1,20 +1,17 @@ package org.bukkit.craftbukkit; +import com.google.common.collect.ImmutableSet; +import com.mojang.authlib.GameProfile; import java.io.IOException; import java.util.Date; import java.util.Set; - +import java.util.logging.Level; import net.minecraft.server.GameProfileBanEntry; import net.minecraft.server.GameProfileBanList; import net.minecraft.server.JsonListEntry; import net.minecraft.server.MinecraftServer; - import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; - -import com.google.common.collect.ImmutableSet; -import com.mojang.authlib.GameProfile; -import java.util.logging.Level; import org.bukkit.Bukkit; public class CraftProfileBanList implements org.bukkit.BanList { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 14cc7ddffa..e19d31a44d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1,14 +1,33 @@ package org.bukkit.craftbukkit; +import com.google.common.base.Charsets; +import com.google.common.base.Function; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterators; +import com.google.common.collect.Lists; +import com.google.common.collect.MapMaker; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import com.mojang.authlib.GameProfile; +import com.mojang.brigadier.StringReader; +import com.mojang.brigadier.exceptions.CommandSyntaxException; +import com.mojang.brigadier.tree.CommandNode; +import com.mojang.brigadier.tree.LiteralCommandNode; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufOutputStream; +import io.netty.buffer.Unpooled; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; +import java.util.Base64; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; @@ -21,25 +40,59 @@ import java.util.UUID; import java.util.function.Consumer; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.regex.Pattern; - import javax.imageio.ImageIO; - -import net.minecraft.server.*; - +import jline.console.ConsoleReader; +import net.minecraft.server.Advancement; +import net.minecraft.server.ArgumentEntity; +import net.minecraft.server.Block; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.BossBattleCustom; +import net.minecraft.server.CommandDispatcher; +import net.minecraft.server.CommandListenerWrapper; +import net.minecraft.server.DedicatedPlayerList; +import net.minecraft.server.DedicatedServer; +import net.minecraft.server.DedicatedServerProperties; +import net.minecraft.server.DedicatedServerSettings; +import net.minecraft.server.DimensionManager; +import net.minecraft.server.Enchantments; +import net.minecraft.server.EntityPlayer; +import net.minecraft.server.EnumDifficulty; +import net.minecraft.server.EnumGamemode; +import net.minecraft.server.Item; +import net.minecraft.server.ItemWorldMap; +import net.minecraft.server.Items; +import net.minecraft.server.JsonListEntry; +import net.minecraft.server.LootTableRegistry; +import net.minecraft.server.MapIcon; +import net.minecraft.server.MinecraftKey; +import net.minecraft.server.MobEffects; +import net.minecraft.server.PlayerList; +import net.minecraft.server.ServerCommand; +import net.minecraft.server.TagsServer; +import net.minecraft.server.Vec3D; +import net.minecraft.server.WorldData; +import net.minecraft.server.WorldMap; +import net.minecraft.server.WorldNBTStorage; +import net.minecraft.server.WorldServer; +import net.minecraft.server.WorldSettings; +import net.minecraft.server.WorldType; +import org.apache.commons.lang.Validate; import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; +import org.bukkit.Keyed; import org.bukkit.Location; +import org.bukkit.NamespacedKey; import org.bukkit.OfflinePlayer; import org.bukkit.Server; +import org.bukkit.StructureType; import org.bukkit.UnsafeValues; import org.bukkit.Warning.WarningState; import org.bukkit.World; -import org.bukkit.StructureType; import org.bukkit.World.Environment; import org.bukkit.WorldCreator; +import org.bukkit.block.data.BlockData; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarFlag; import org.bukkit.boss.BarStyle; @@ -55,20 +108,28 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.serialization.ConfigurationSerialization; import org.bukkit.conversations.Conversable; +import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.boss.CraftBossBar; import org.bukkit.craftbukkit.boss.CraftKeyedBossbar; +import org.bukkit.craftbukkit.command.BukkitCommandWrapper; +import org.bukkit.craftbukkit.command.CraftCommandMap; +import org.bukkit.craftbukkit.command.VanillaCommandWrapper; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.generator.CraftChunkData; import org.bukkit.craftbukkit.help.SimpleHelpMap; +import org.bukkit.craftbukkit.inventory.CraftBlastingRecipe; +import org.bukkit.craftbukkit.inventory.CraftCampfireRecipe; import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe; -import org.bukkit.craftbukkit.inventory.CraftInventoryCustom; -import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.inventory.CraftItemFactory; +import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.inventory.CraftMerchantCustom; import org.bukkit.craftbukkit.inventory.CraftRecipe; import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe; +import org.bukkit.craftbukkit.inventory.CraftSmokingRecipe; +import org.bukkit.craftbukkit.inventory.CraftStonecuttingRecipe; import org.bukkit.craftbukkit.inventory.RecipeIterator; +import org.bukkit.craftbukkit.inventory.util.CraftInventoryCreator; import org.bukkit.craftbukkit.map.CraftMapView; import org.bukkit.craftbukkit.metadata.EntityMetadataStore; import org.bukkit.craftbukkit.metadata.PlayerMetadataStore; @@ -76,8 +137,12 @@ import org.bukkit.craftbukkit.metadata.WorldMetadataStore; import org.bukkit.craftbukkit.potion.CraftPotionBrewer; import org.bukkit.craftbukkit.scheduler.CraftScheduler; import org.bukkit.craftbukkit.scoreboard.CraftScoreboardManager; +import org.bukkit.craftbukkit.tag.CraftBlockTag; +import org.bukkit.craftbukkit.tag.CraftItemTag; +import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.craftbukkit.util.CraftIconCache; import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.craftbukkit.util.DatFileFilter; import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; @@ -86,19 +151,25 @@ import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; +import org.bukkit.event.server.ServerLoadEvent; +import org.bukkit.event.server.TabCompleteEvent; import org.bukkit.event.world.WorldInitEvent; import org.bukkit.event.world.WorldLoadEvent; import org.bukkit.event.world.WorldUnloadEvent; import org.bukkit.generator.ChunkGenerator; import org.bukkit.help.HelpMap; +import org.bukkit.inventory.BlastingRecipe; +import org.bukkit.inventory.CampfireRecipe; import org.bukkit.inventory.FurnaceRecipe; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.Merchant; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.Merchant; import org.bukkit.inventory.Recipe; import org.bukkit.inventory.ShapedRecipe; import org.bukkit.inventory.ShapelessRecipe; +import org.bukkit.inventory.SmokingRecipe; +import org.bukkit.inventory.StonecuttingRecipe; import org.bukkit.loot.LootTable; import org.bukkit.map.MapView; import org.bukkit.permissions.Permissible; @@ -111,64 +182,15 @@ import org.bukkit.plugin.SimplePluginManager; import org.bukkit.plugin.SimpleServicesManager; import org.bukkit.plugin.java.JavaPluginLoader; import org.bukkit.plugin.messaging.Messenger; +import org.bukkit.plugin.messaging.StandardMessenger; import org.bukkit.potion.Potion; import org.bukkit.potion.PotionEffectType; -import org.bukkit.plugin.messaging.StandardMessenger; import org.bukkit.scheduler.BukkitWorker; import org.bukkit.util.StringUtil; import org.bukkit.util.permissions.DefaultPermissions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.error.MarkedYAMLException; -import org.apache.commons.lang.Validate; - -import com.google.common.base.Charsets; -import com.google.common.base.Function; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterators; -import com.google.common.collect.Lists; -import com.google.common.collect.MapMaker; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; -import com.mojang.authlib.GameProfile; -import com.mojang.brigadier.StringReader; -import com.mojang.brigadier.builder.LiteralArgumentBuilder; -import com.mojang.brigadier.exceptions.CommandSyntaxException; -import com.mojang.brigadier.tree.CommandNode; -import com.mojang.brigadier.tree.LiteralCommandNode; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufOutputStream; -import io.netty.buffer.Unpooled; -import it.unimi.dsi.fastutil.longs.LongIterator; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.Base64; -import java.util.HashMap; -import jline.console.ConsoleReader; -import org.bukkit.Keyed; -import org.bukkit.NamespacedKey; -import org.bukkit.block.data.BlockData; -import org.bukkit.craftbukkit.block.data.CraftBlockData; -import org.bukkit.craftbukkit.command.BukkitCommandWrapper; -import org.bukkit.craftbukkit.command.CraftCommandMap; -import org.bukkit.craftbukkit.command.VanillaCommandWrapper; -import org.bukkit.craftbukkit.inventory.CraftBlastingRecipe; -import org.bukkit.craftbukkit.inventory.CraftCampfireRecipe; -import org.bukkit.craftbukkit.inventory.CraftSmokingRecipe; -import org.bukkit.craftbukkit.inventory.CraftStonecuttingRecipe; -import org.bukkit.craftbukkit.inventory.util.CraftInventoryCreator; -import org.bukkit.craftbukkit.tag.CraftBlockTag; -import org.bukkit.craftbukkit.tag.CraftItemTag; -import org.bukkit.craftbukkit.util.CraftChatMessage; -import org.bukkit.craftbukkit.util.CraftNamespacedKey; -import org.bukkit.event.server.ServerLoadEvent; -import org.bukkit.event.server.TabCompleteEvent; -import org.bukkit.inventory.BlastingRecipe; -import org.bukkit.inventory.CampfireRecipe; -import org.bukkit.inventory.SmokingRecipe; -import org.bukkit.inventory.StonecuttingRecipe; public final class CraftServer implements Server { private final String serverName = "CraftBukkit"; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java index b43201cfdb..73cb64e09d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java @@ -4,7 +4,6 @@ import com.google.common.base.Preconditions; import net.minecraft.server.IRegistry; import net.minecraft.server.MinecraftKey; import net.minecraft.server.SoundEffect; - import org.apache.commons.lang.Validate; import org.bukkit.Sound; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java index a34e05e9a0..7d5290526e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java @@ -1,11 +1,5 @@ package org.bukkit.craftbukkit; -import net.minecraft.server.StatisticList; - -import org.bukkit.Statistic; -import org.bukkit.Material; -import org.bukkit.entity.EntityType; - import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; @@ -14,7 +8,11 @@ import net.minecraft.server.EntityTypes; import net.minecraft.server.IRegistry; import net.minecraft.server.Item; import net.minecraft.server.MinecraftKey; +import net.minecraft.server.StatisticList; +import org.bukkit.Material; +import org.bukkit.Statistic; import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.entity.EntityType; public enum CraftStatistic { DAMAGE_DEALT(StatisticList.DAMAGE_DEALT), diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 6ee5dbefbd..be47811b65 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -8,16 +8,82 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; -import java.util.List; import java.util.Iterator; +import java.util.List; import java.util.Objects; import java.util.Random; import java.util.Set; import java.util.UUID; import java.util.function.Predicate; - -import net.minecraft.server.*; - +import net.minecraft.server.AxisAlignedBB; +import net.minecraft.server.BiomeBase; +import net.minecraft.server.BlockChorusFlower; +import net.minecraft.server.BlockDiodeAbstract; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.Blocks; +import net.minecraft.server.ChunkCoordIntPair; +import net.minecraft.server.ChunkStatus; +import net.minecraft.server.EntityAreaEffectCloud; +import net.minecraft.server.EntityArmorStand; +import net.minecraft.server.EntityArrow; +import net.minecraft.server.EntityBoat; +import net.minecraft.server.EntityEgg; +import net.minecraft.server.EntityEnderSignal; +import net.minecraft.server.EntityEvokerFangs; +import net.minecraft.server.EntityExperienceOrb; +import net.minecraft.server.EntityFallingBlock; +import net.minecraft.server.EntityFireball; +import net.minecraft.server.EntityFireworks; +import net.minecraft.server.EntityHanging; +import net.minecraft.server.EntityHuman; +import net.minecraft.server.EntityInsentient; +import net.minecraft.server.EntityItem; +import net.minecraft.server.EntityItemFrame; +import net.minecraft.server.EntityLeash; +import net.minecraft.server.EntityLightning; +import net.minecraft.server.EntityMinecartChest; +import net.minecraft.server.EntityMinecartCommandBlock; +import net.minecraft.server.EntityMinecartFurnace; +import net.minecraft.server.EntityMinecartHopper; +import net.minecraft.server.EntityMinecartMobSpawner; +import net.minecraft.server.EntityMinecartRideable; +import net.minecraft.server.EntityMinecartTNT; +import net.minecraft.server.EntityPainting; +import net.minecraft.server.EntityPotion; +import net.minecraft.server.EntitySnowball; +import net.minecraft.server.EntityTNTPrimed; +import net.minecraft.server.EntityTippedArrow; +import net.minecraft.server.EntityTypes; +import net.minecraft.server.EntityZombie; +import net.minecraft.server.EnumDifficulty; +import net.minecraft.server.EnumDirection; +import net.minecraft.server.EnumMobSpawn; +import net.minecraft.server.ExceptionWorldConflict; +import net.minecraft.server.Explosion; +import net.minecraft.server.GameRules; +import net.minecraft.server.GroupDataEntity; +import net.minecraft.server.HeightMap; +import net.minecraft.server.IBlockData; +import net.minecraft.server.IChunkAccess; +import net.minecraft.server.MinecraftKey; +import net.minecraft.server.MovingObjectPosition; +import net.minecraft.server.PacketPlayOutCustomSoundEffect; +import net.minecraft.server.PacketPlayOutUpdateTime; +import net.minecraft.server.PacketPlayOutWorldEvent; +import net.minecraft.server.PlayerChunk; +import net.minecraft.server.ProtoChunkExtension; +import net.minecraft.server.RayTrace; +import net.minecraft.server.SoundCategory; +import net.minecraft.server.TicketType; +import net.minecraft.server.Unit; +import net.minecraft.server.Vec3D; +import net.minecraft.server.WorldGenFeatureEmptyConfiguration; +import net.minecraft.server.WorldGenerator; +import net.minecraft.server.WorldNBTStorage; +import net.minecraft.server.WorldProviderHell; +import net.minecraft.server.WorldProviderNormal; +import net.minecraft.server.WorldProviderTheEnd; +import net.minecraft.server.WorldServer; import org.apache.commons.lang.Validate; import org.bukkit.BlockChangeDelegate; import org.bukkit.Bukkit; @@ -42,14 +108,125 @@ import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.block.CraftBlockState; import org.bukkit.craftbukkit.block.data.CraftBlockData; -import org.bukkit.craftbukkit.entity.*; +import org.bukkit.craftbukkit.entity.CraftItem; +import org.bukkit.craftbukkit.entity.CraftLightningStrike; +import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.metadata.BlockMetadataStore; import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.CraftRayTraceResult; -import org.bukkit.entity.*; +import org.bukkit.entity.AbstractHorse; +import org.bukkit.entity.AbstractVillager; +import org.bukkit.entity.Ambient; +import org.bukkit.entity.AreaEffectCloud; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Bat; +import org.bukkit.entity.Blaze; +import org.bukkit.entity.Boat; +import org.bukkit.entity.Cat; +import org.bukkit.entity.CaveSpider; +import org.bukkit.entity.ChestedHorse; +import org.bukkit.entity.Chicken; +import org.bukkit.entity.Cod; +import org.bukkit.entity.ComplexLivingEntity; +import org.bukkit.entity.Cow; +import org.bukkit.entity.Creeper; +import org.bukkit.entity.Dolphin; +import org.bukkit.entity.Donkey; +import org.bukkit.entity.DragonFireball; +import org.bukkit.entity.Drowned; +import org.bukkit.entity.Egg; +import org.bukkit.entity.ElderGuardian; +import org.bukkit.entity.EnderCrystal; +import org.bukkit.entity.EnderDragon; +import org.bukkit.entity.EnderPearl; +import org.bukkit.entity.EnderSignal; +import org.bukkit.entity.Enderman; +import org.bukkit.entity.Endermite; import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Evoker; +import org.bukkit.entity.EvokerFangs; +import org.bukkit.entity.ExperienceOrb; +import org.bukkit.entity.FallingBlock; +import org.bukkit.entity.Fireball; +import org.bukkit.entity.Firework; +import org.bukkit.entity.Fish; +import org.bukkit.entity.Fox; +import org.bukkit.entity.Ghast; +import org.bukkit.entity.Giant; +import org.bukkit.entity.Golem; +import org.bukkit.entity.Guardian; +import org.bukkit.entity.Hanging; +import org.bukkit.entity.HumanEntity; +import org.bukkit.entity.Husk; +import org.bukkit.entity.Illager; +import org.bukkit.entity.Illusioner; +import org.bukkit.entity.IronGolem; +import org.bukkit.entity.ItemFrame; +import org.bukkit.entity.LeashHitch; +import org.bukkit.entity.LightningStrike; +import org.bukkit.entity.LingeringPotion; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Llama; +import org.bukkit.entity.LlamaSpit; +import org.bukkit.entity.MagmaCube; +import org.bukkit.entity.Minecart; +import org.bukkit.entity.Mule; +import org.bukkit.entity.MushroomCow; +import org.bukkit.entity.Ocelot; +import org.bukkit.entity.Painting; +import org.bukkit.entity.Panda; +import org.bukkit.entity.Parrot; +import org.bukkit.entity.Phantom; +import org.bukkit.entity.Pig; +import org.bukkit.entity.PigZombie; +import org.bukkit.entity.Pillager; +import org.bukkit.entity.Player; +import org.bukkit.entity.PolarBear; +import org.bukkit.entity.Projectile; +import org.bukkit.entity.PufferFish; +import org.bukkit.entity.Rabbit; +import org.bukkit.entity.Ravager; +import org.bukkit.entity.Salmon; +import org.bukkit.entity.Sheep; +import org.bukkit.entity.Shulker; +import org.bukkit.entity.ShulkerBullet; +import org.bukkit.entity.Silverfish; +import org.bukkit.entity.Skeleton; +import org.bukkit.entity.SkeletonHorse; +import org.bukkit.entity.Slime; +import org.bukkit.entity.SmallFireball; +import org.bukkit.entity.Snowball; +import org.bukkit.entity.Snowman; +import org.bukkit.entity.SpectralArrow; +import org.bukkit.entity.Spellcaster; +import org.bukkit.entity.Spider; +import org.bukkit.entity.Squid; +import org.bukkit.entity.Stray; +import org.bukkit.entity.TNTPrimed; +import org.bukkit.entity.Tameable; +import org.bukkit.entity.ThrownExpBottle; +import org.bukkit.entity.ThrownPotion; +import org.bukkit.entity.TippedArrow; +import org.bukkit.entity.TraderLlama; +import org.bukkit.entity.Trident; +import org.bukkit.entity.TropicalFish; +import org.bukkit.entity.Turtle; +import org.bukkit.entity.Vex; +import org.bukkit.entity.Villager; +import org.bukkit.entity.Vindicator; +import org.bukkit.entity.WanderingTrader; +import org.bukkit.entity.Witch; +import org.bukkit.entity.Wither; +import org.bukkit.entity.WitherSkeleton; +import org.bukkit.entity.WitherSkull; +import org.bukkit.entity.Wolf; +import org.bukkit.entity.Zombie; +import org.bukkit.entity.ZombieHorse; +import org.bukkit.entity.ZombieVillager; import org.bukkit.entity.minecart.CommandMinecart; import org.bukkit.entity.minecart.ExplosiveMinecart; import org.bukkit.entity.minecart.HopperMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index dc420f4174..a3388d305e 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -7,7 +7,6 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.List; -import java.util.TimeZone; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java index 8ed4d99fee..6a6a898482 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.TileEntityBlastFurnace; import org.bukkit.Material; -import org.bukkit.block.Block; import org.bukkit.block.BlastFurnace; +import org.bukkit.block.Block; public class CraftBlastFurnace extends CraftFurnace implements BlastFurnace { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index afef6a11ca..8eabf86027 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -1,14 +1,27 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.stream.Collectors; - -import net.minecraft.server.*; - +import net.minecraft.server.AxisAlignedBB; +import net.minecraft.server.BiomeBase; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.BlockRedstoneWire; +import net.minecraft.server.BlockTileEntity; +import net.minecraft.server.Blocks; +import net.minecraft.server.EnumDirection; +import net.minecraft.server.EnumSkyBlock; +import net.minecraft.server.GeneratorAccess; +import net.minecraft.server.IBlockData; +import net.minecraft.server.IRegistry; +import net.minecraft.server.MinecraftKey; +import net.minecraft.server.MovingObjectPosition; +import net.minecraft.server.RayTrace; +import net.minecraft.server.TileEntity; +import net.minecraft.server.Vec3D; +import net.minecraft.server.VoxelShape; +import net.minecraft.server.WorldServer; import org.apache.commons.lang.Validate; import org.bukkit.Chunk; import org.bukkit.FluidCollisionMode; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 7fe1dd6015..8f14254901 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -1,12 +1,15 @@ package org.bukkit.craftbukkit.block; import com.google.common.base.Preconditions; +import java.util.List; import net.minecraft.server.BlockPosition; -import org.bukkit.Location; -import org.bukkit.block.Block; +import net.minecraft.server.GeneratorAccess; +import net.minecraft.server.IBlockData; import org.bukkit.Chunk; +import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; +import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftChunk; @@ -18,10 +21,6 @@ import org.bukkit.material.MaterialData; import org.bukkit.metadata.MetadataValue; import org.bukkit.plugin.Plugin; -import java.util.List; -import net.minecraft.server.GeneratorAccess; -import net.minecraft.server.IBlockData; - public class CraftBlockState implements BlockState { private final CraftWorld world; private final CraftChunk chunk; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java index 89038ffc45..37b6ad55c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java @@ -5,7 +5,6 @@ import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BrewingStand; import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer; -import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.inventory.BrewerInventory; public class CraftBrewingStand extends CraftContainer implements BrewingStand { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index f881a6be7e..142521a172 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -5,7 +5,6 @@ import net.minecraft.server.Blocks; import net.minecraft.server.ITileInventory; import net.minecraft.server.InventoryLargeChest; import net.minecraft.server.TileEntityChest; - import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java index 835d394df3..5c4c3c70c7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -5,7 +5,6 @@ import net.minecraft.server.EntityTypes; import net.minecraft.server.MinecraftKey; import net.minecraft.server.TileEntityMobSpawner; import org.bukkit.Material; - import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java index 452ea9e4c5..ab31963f79 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java @@ -1,10 +1,8 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.BlockDispenser; -import net.minecraft.server.BlockPosition; import net.minecraft.server.Blocks; import net.minecraft.server.TileEntityDispenser; - import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Dispenser; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java index 6b4bdbc8cd..12d65bf6c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java @@ -1,10 +1,8 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.BlockDropper; -import net.minecraft.server.BlockPosition; import net.minecraft.server.Blocks; import net.minecraft.server.TileEntityDropper; - import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Dropper; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 9d563e538c..a4bc7f9701 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -7,7 +7,6 @@ import net.minecraft.server.TileEntitySkull; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; - import org.bukkit.SkullType; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java index ab049ed52c..c1666a9baf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -1,6 +1,5 @@ package org.bukkit.craftbukkit.block.data; -import java.util.stream.Collectors; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; @@ -11,6 +10,7 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import java.util.HashMap; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import net.minecraft.server.ArgumentBlock; import net.minecraft.server.Block; import net.minecraft.server.BlockDataAbstract; diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java index 32eab86d7d..c1fe52e1b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.block.data.type; -import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.block.data.type.Jukebox; +import org.bukkit.craftbukkit.block.data.CraftBlockData; public abstract class CraftJukebox extends CraftBlockData implements Jukebox { diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java index e9f92eccd2..d1033d73d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java @@ -2,6 +2,11 @@ package org.bukkit.craftbukkit.boss; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Supplier; import net.minecraft.server.BossBattle; import net.minecraft.server.BossBattleServer; import net.minecraft.server.EntityPlayer; @@ -14,12 +19,6 @@ import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.entity.Player; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Supplier; - public class CraftBossBar implements BossBar { private final BossBattleServer handle; diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java index 26a2fb8942..fdf2f075e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java @@ -2,15 +2,13 @@ package org.bukkit.craftbukkit.command; import java.util.EnumMap; import java.util.Map; - -import org.fusesource.jansi.Ansi; -import org.fusesource.jansi.Ansi.Attribute; import jline.Terminal; - import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.craftbukkit.CraftServer; +import org.fusesource.jansi.Ansi; +import org.fusesource.jansi.Ansi.Attribute; public class ColouredConsoleSender extends CraftConsoleCommandSender { private final Terminal terminal; diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java index 33e8ea02c4..48d4dc7e2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -4,11 +4,9 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.logging.Level; - +import jline.console.completer.Completer; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.util.Waitable; - -import jline.console.completer.Completer; import org.bukkit.event.server.TabCompleteEvent; public class ConsoleCommandCompleter implements Completer { diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java index 701a57e020..cb2f8aa008 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java @@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.command; import net.minecraft.server.CommandListenerWrapper; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.TileEntity; - import org.bukkit.block.Block; import org.bukkit.command.BlockCommandSender; import org.bukkit.craftbukkit.block.CraftBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java index 07c34cb202..477e920968 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java @@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.command; import java.util.Set; import net.minecraft.server.CommandListenerWrapper; - import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.command.ProxiedCommandSender; diff --git a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java index 1314c744be..3dc333f327 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.command; +import java.util.Set; import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -9,8 +10,6 @@ import org.bukkit.permissions.PermissionAttachment; import org.bukkit.permissions.PermissionAttachmentInfo; import org.bukkit.plugin.Plugin; -import java.util.Set; - public abstract class ServerCommandSender implements CommandSender { private final PermissibleBase perm = new PermissibleBase(this); diff --git a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java index eefa68a695..72127dde54 100644 --- a/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java +++ b/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.conversations; import java.util.LinkedList; import java.util.logging.Level; - import org.bukkit.Bukkit; import org.bukkit.conversations.Conversation; import org.bukkit.conversations.ConversationAbandonedEvent; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java index ca36bfc308..2ab5addafe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java @@ -6,11 +6,11 @@ import net.minecraft.server.EntityVillagerAbstract; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftMerchant; +import org.bukkit.entity.AbstractVillager; import org.bukkit.entity.HumanEntity; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.MerchantRecipe; -import org.bukkit.entity.AbstractVillager; public class CraftAbstractVillager extends CraftAgeable implements AbstractVillager, InventoryHolder { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java index edb07964ac..2e270712e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityAgeable; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Ageable; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java index 56e5d9d99c..599db583b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.entity; -import java.util.UUID; import com.google.common.base.Preconditions; +import java.util.UUID; import net.minecraft.server.EntityAnimal; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Animals; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java index 7e9239cf12..21b6c8c19c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java @@ -1,11 +1,11 @@ package org.bukkit.craftbukkit.entity; +import com.google.common.collect.ImmutableList; import java.util.List; import net.minecraft.server.EntityAreaEffectCloud; import net.minecraft.server.EntityLiving; import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; - import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Particle; @@ -15,12 +15,10 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; +import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.projectiles.ProjectileSource; -import org.bukkit.potion.PotionData; - -import com.google.common.collect.ImmutableList; public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index f5b9d47b43..19ddd86d38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import net.minecraft.server.BlockPosition; import net.minecraft.server.EntityArrow; - import org.apache.commons.lang.Validate; import org.bukkit.block.Block; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java index 830d7a8406..b1efeb7454 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityBlaze; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Blaze; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java index 0648a851d2..a1fe8dd527 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityCaveSpider; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.CaveSpider; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java index d20c2196ce..440c3f185f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityChicken; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Chicken; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java index fc48ebd9b2..3675ea887c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityCow; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Cow; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java index ffebb54caa..2f2abb7077 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import net.minecraft.server.EntityCreeper; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java index cc331c28c7..5cae78db6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -2,13 +2,10 @@ package org.bukkit.craftbukkit.entity; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet.Builder; - import java.util.Set; - import net.minecraft.server.DragonControllerPhase; import net.minecraft.server.EntityComplexPart; import net.minecraft.server.EntityEnderDragon; - import org.bukkit.boss.BossBar; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.boss.CraftBossBar; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java index b81693d9ff..da8a70d6ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityEnderman; - import net.minecraft.server.IBlockData; import org.bukkit.Material; import org.bukkit.block.data.BlockData; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index dc98c464c1..c0ae544c23 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -6,9 +6,137 @@ import com.google.common.collect.Lists; import java.util.List; import java.util.Set; import java.util.UUID; - -import net.minecraft.server.*; - +import net.minecraft.server.AxisAlignedBB; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.DamageSource; +import net.minecraft.server.Entity; +import net.minecraft.server.EntityAmbient; +import net.minecraft.server.EntityAnimal; +import net.minecraft.server.EntityAreaEffectCloud; +import net.minecraft.server.EntityArmorStand; +import net.minecraft.server.EntityArrow; +import net.minecraft.server.EntityBat; +import net.minecraft.server.EntityBlaze; +import net.minecraft.server.EntityBoat; +import net.minecraft.server.EntityCat; +import net.minecraft.server.EntityCaveSpider; +import net.minecraft.server.EntityChicken; +import net.minecraft.server.EntityCod; +import net.minecraft.server.EntityComplexPart; +import net.minecraft.server.EntityCow; +import net.minecraft.server.EntityCreature; +import net.minecraft.server.EntityCreeper; +import net.minecraft.server.EntityDolphin; +import net.minecraft.server.EntityDragonFireball; +import net.minecraft.server.EntityDrowned; +import net.minecraft.server.EntityEgg; +import net.minecraft.server.EntityEnderCrystal; +import net.minecraft.server.EntityEnderDragon; +import net.minecraft.server.EntityEnderPearl; +import net.minecraft.server.EntityEnderSignal; +import net.minecraft.server.EntityEnderman; +import net.minecraft.server.EntityEndermite; +import net.minecraft.server.EntityEvoker; +import net.minecraft.server.EntityEvokerFangs; +import net.minecraft.server.EntityExperienceOrb; +import net.minecraft.server.EntityFallingBlock; +import net.minecraft.server.EntityFireball; +import net.minecraft.server.EntityFireworks; +import net.minecraft.server.EntityFish; +import net.minecraft.server.EntityFishingHook; +import net.minecraft.server.EntityFlying; +import net.minecraft.server.EntityFox; +import net.minecraft.server.EntityGhast; +import net.minecraft.server.EntityGiantZombie; +import net.minecraft.server.EntityGolem; +import net.minecraft.server.EntityGuardian; +import net.minecraft.server.EntityGuardianElder; +import net.minecraft.server.EntityHanging; +import net.minecraft.server.EntityHorse; +import net.minecraft.server.EntityHorseAbstract; +import net.minecraft.server.EntityHorseChestedAbstract; +import net.minecraft.server.EntityHorseDonkey; +import net.minecraft.server.EntityHorseMule; +import net.minecraft.server.EntityHorseSkeleton; +import net.minecraft.server.EntityHorseZombie; +import net.minecraft.server.EntityHuman; +import net.minecraft.server.EntityIllagerAbstract; +import net.minecraft.server.EntityIllagerIllusioner; +import net.minecraft.server.EntityIllagerWizard; +import net.minecraft.server.EntityIronGolem; +import net.minecraft.server.EntityItem; +import net.minecraft.server.EntityItemFrame; +import net.minecraft.server.EntityLLamaTrader; +import net.minecraft.server.EntityLargeFireball; +import net.minecraft.server.EntityLeash; +import net.minecraft.server.EntityLightning; +import net.minecraft.server.EntityLiving; +import net.minecraft.server.EntityLlama; +import net.minecraft.server.EntityLlamaSpit; +import net.minecraft.server.EntityMagmaCube; +import net.minecraft.server.EntityMinecartAbstract; +import net.minecraft.server.EntityMinecartChest; +import net.minecraft.server.EntityMinecartCommandBlock; +import net.minecraft.server.EntityMinecartFurnace; +import net.minecraft.server.EntityMinecartHopper; +import net.minecraft.server.EntityMinecartMobSpawner; +import net.minecraft.server.EntityMinecartRideable; +import net.minecraft.server.EntityMinecartTNT; +import net.minecraft.server.EntityMonster; +import net.minecraft.server.EntityMushroomCow; +import net.minecraft.server.EntityOcelot; +import net.minecraft.server.EntityPainting; +import net.minecraft.server.EntityPanda; +import net.minecraft.server.EntityParrot; +import net.minecraft.server.EntityPhantom; +import net.minecraft.server.EntityPig; +import net.minecraft.server.EntityPigZombie; +import net.minecraft.server.EntityPillager; +import net.minecraft.server.EntityPlayer; +import net.minecraft.server.EntityPolarBear; +import net.minecraft.server.EntityPotion; +import net.minecraft.server.EntityProjectile; +import net.minecraft.server.EntityPufferFish; +import net.minecraft.server.EntityRabbit; +import net.minecraft.server.EntityRavager; +import net.minecraft.server.EntitySalmon; +import net.minecraft.server.EntitySheep; +import net.minecraft.server.EntityShulker; +import net.minecraft.server.EntityShulkerBullet; +import net.minecraft.server.EntitySilverfish; +import net.minecraft.server.EntitySkeletonAbstract; +import net.minecraft.server.EntitySkeletonStray; +import net.minecraft.server.EntitySkeletonWither; +import net.minecraft.server.EntitySlime; +import net.minecraft.server.EntitySmallFireball; +import net.minecraft.server.EntitySnowball; +import net.minecraft.server.EntitySnowman; +import net.minecraft.server.EntitySpectralArrow; +import net.minecraft.server.EntitySpider; +import net.minecraft.server.EntitySquid; +import net.minecraft.server.EntityTNTPrimed; +import net.minecraft.server.EntityTameableAnimal; +import net.minecraft.server.EntityThrownExpBottle; +import net.minecraft.server.EntityThrownTrident; +import net.minecraft.server.EntityTippedArrow; +import net.minecraft.server.EntityTropicalFish; +import net.minecraft.server.EntityTurtle; +import net.minecraft.server.EntityVex; +import net.minecraft.server.EntityVillager; +import net.minecraft.server.EntityVillagerAbstract; +import net.minecraft.server.EntityVillagerTrader; +import net.minecraft.server.EntityVindicator; +import net.minecraft.server.EntityWaterAnimal; +import net.minecraft.server.EntityWitch; +import net.minecraft.server.EntityWither; +import net.minecraft.server.EntityWitherSkull; +import net.minecraft.server.EntityWolf; +import net.minecraft.server.EntityZombie; +import net.minecraft.server.EntityZombieHusk; +import net.minecraft.server.EntityZombieVillager; +import net.minecraft.server.EnumChatFormat; +import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.NBTTagCompound; import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Server; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java index b4322dff66..04b2324a57 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityFallingBlock; - import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java index 7703cc726b..c31eba723e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityFireball; import net.minecraft.server.MathHelper; - import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java index 7b3b206823..6b69be7421 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -1,9 +1,9 @@ package org.bukkit.craftbukkit.entity; +import java.util.Random; import net.minecraft.server.EntityFireworks; import net.minecraft.server.ItemStack; import net.minecraft.server.Items; - import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftItemStack; @@ -11,8 +11,6 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.Firework; import org.bukkit.inventory.meta.FireworkMeta; -import java.util.Random; - public class CraftFirework extends CraftEntity implements Firework { private final Random random = new Random(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java index 8392b16b3b..75aae03b62 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -4,7 +4,6 @@ import net.minecraft.server.BlockPosition; import net.minecraft.server.EntityFishingHook; import net.minecraft.server.EntityHuman; import net.minecraft.server.MathHelper; - import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java index ee9516fc41..c661673a66 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityGhast; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ghast; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java index e5609130d2..8e27e7bd06 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityGiantZombie; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Giant; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index af6b52324a..fa4fe5bcf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -6,7 +6,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Optional; import java.util.Set; -import net.minecraft.server.BlockAnvil; import net.minecraft.server.BlockBed; import net.minecraft.server.BlockEnchantmentTable; import net.minecraft.server.BlockPosition; @@ -27,7 +26,6 @@ import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.IInventory; import net.minecraft.server.IMerchant; import net.minecraft.server.IRecipe; -import net.minecraft.server.ITileEntityContainer; import net.minecraft.server.ITileInventory; import net.minecraft.server.ItemCooldown; import net.minecraft.server.NBTTagCompound; @@ -40,8 +38,6 @@ import net.minecraft.server.TileEntityBlastFurnace; import net.minecraft.server.TileEntityBrewingStand; import net.minecraft.server.TileEntityDispenser; import net.minecraft.server.TileEntityDropper; -import net.minecraft.server.TileEntityEnchantTable; -import net.minecraft.server.TileEntityFurnace; import net.minecraft.server.TileEntityFurnaceFurnace; import net.minecraft.server.TileEntityHopper; import net.minecraft.server.TileEntityLectern; @@ -61,7 +57,6 @@ import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer; import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.craftbukkit.inventory.CraftItemStack; -import org.bukkit.craftbukkit.inventory.CraftMerchant; import org.bukkit.craftbukkit.inventory.CraftMerchantCustom; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java index 55d6bacf77..0dbca8f00c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -2,12 +2,11 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.Entity; import net.minecraft.server.EntityItem; - +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.EntityType; import org.bukkit.entity.Item; import org.bukkit.inventory.ItemStack; -import org.bukkit.craftbukkit.inventory.CraftItemStack; -import org.bukkit.craftbukkit.CraftServer; public class CraftItem extends CraftEntity implements Item { private final EntityItem item; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index 227a9ffa03..da642ceb96 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -6,9 +6,7 @@ import net.minecraft.server.EntityItemFrame; import net.minecraft.server.EnumDirection; import net.minecraft.server.ItemStack; import net.minecraft.server.WorldServer; - import org.apache.commons.lang.Validate; - import org.bukkit.Rotation; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java index 710ed7a646..1959a1a3ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityLeash; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LeashHitch; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index db7d292e8a..d01e06f1b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -6,16 +6,15 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Set; - import net.minecraft.server.DamageSource; import net.minecraft.server.EntityArmorStand; import net.minecraft.server.EntityArrow; import net.minecraft.server.EntityDragonFireball; import net.minecraft.server.EntityEgg; import net.minecraft.server.EntityEnderPearl; +import net.minecraft.server.EntityFireball; import net.minecraft.server.EntityFishingHook; import net.minecraft.server.EntityHuman; -import net.minecraft.server.EntityFireball; import net.minecraft.server.EntityInsentient; import net.minecraft.server.EntityLargeFireball; import net.minecraft.server.EntityLiving; @@ -25,17 +24,16 @@ import net.minecraft.server.EntityProjectile; import net.minecraft.server.EntityShulkerBullet; import net.minecraft.server.EntitySmallFireball; import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntityThrownExpBottle; -import net.minecraft.server.EntityTippedArrow; import net.minecraft.server.EntitySpectralArrow; +import net.minecraft.server.EntityThrownExpBottle; import net.minecraft.server.EntityThrownTrident; +import net.minecraft.server.EntityTippedArrow; import net.minecraft.server.EntityTypes; import net.minecraft.server.EntityWither; import net.minecraft.server.EntityWitherSkull; import net.minecraft.server.GenericAttributes; import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; - import org.apache.commons.lang.Validate; import org.bukkit.FluidCollisionMode; import org.bukkit.Location; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java index dace70b4f9..92d36cec4b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMagmaCube; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.MagmaCube; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java index 7d31981208..101f7c1f64 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.Blocks; import net.minecraft.server.EntityMinecartAbstract; - import net.minecraft.server.IBlockData; import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java index 1b5b266c05..9225082bdb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartChest; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java index b178acd475..89affac56d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java @@ -1,9 +1,7 @@ package org.bukkit.craftbukkit.entity; import java.util.Set; - import net.minecraft.server.EntityMinecartCommandBlock; - import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java index 2d2d945235..bdb995b257 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartFurnace; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.PoweredMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java index f29365c948..44b3418b1d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartHopper; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java index a78d81691b..6b7e363b48 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartMobSpawner; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.SpawnerMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java index 9305d8841f..4394ed1ba8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartAbstract; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.RideableMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java index 0c8109bb16..641f9c8f3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecartTNT; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.minecart.ExplosiveMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java index 72dedbc8f4..6bfb4bc35d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMonster; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Monster; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java index 3dd7ea3f22..c1ae676f24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMushroomCow; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.MushroomCow; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java index 05c36ed885..628015a9af 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java @@ -4,7 +4,6 @@ import net.minecraft.server.EntityPainting; import net.minecraft.server.EntityTypes; import net.minecraft.server.Paintings; import net.minecraft.server.WorldServer; - import org.bukkit.Art; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.CraftArt; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java index 60520ca37f..feab3601d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import net.minecraft.server.EntityPanda; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.entity.Panda; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Panda; public class CraftPanda extends CraftAnimals implements Panda { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java index 82bc7a6f03..415ddde18d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPig; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Pig; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java index c8d66f311c..952bb1b6d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPigZombie; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.PigZombie; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java index 4c39520df7..d889fe8c38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPillager; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventory; -import org.bukkit.entity.Pillager; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Pillager; import org.bukkit.inventory.Inventory; public class CraftPillager extends CraftIllager implements Pillager { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 57383feb26..5a1b6c3dc3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -5,7 +5,6 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; import com.mojang.authlib.GameProfile; import io.netty.buffer.Unpooled; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.lang.ref.WeakReference; @@ -23,7 +22,7 @@ import java.util.UUID; import java.util.WeakHashMap; import java.util.logging.Level; import java.util.logging.Logger; - +import javax.annotation.Nullable; import net.minecraft.server.AdvancementDataPlayer; import net.minecraft.server.AdvancementProgress; import net.minecraft.server.AttributeInstance; @@ -64,32 +63,40 @@ import net.minecraft.server.TileEntitySign; import net.minecraft.server.Vec3D; import net.minecraft.server.WhiteListEntry; import net.minecraft.server.WorldServer; - -import org.apache.commons.lang.Validate; import org.apache.commons.lang.NotImplementedException; -import org.bukkit.*; +import org.apache.commons.lang.Validate; import org.bukkit.Achievement; import org.bukkit.BanList; -import org.bukkit.Statistic; +import org.bukkit.Bukkit; +import org.bukkit.Effect; +import org.bukkit.GameMode; +import org.bukkit.Instrument; +import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.Note; +import org.bukkit.OfflinePlayer; +import org.bukkit.Particle; +import org.bukkit.Sound; +import org.bukkit.Statistic; import org.bukkit.Statistic.Type; +import org.bukkit.WeatherType; import org.bukkit.block.data.BlockData; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.conversations.Conversation; import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.conversations.ManuallyAbandonedConversationCanceller; -import org.bukkit.craftbukkit.CraftParticle; -import org.bukkit.craftbukkit.block.CraftSign; -import org.bukkit.craftbukkit.block.data.CraftBlockData; -import org.bukkit.craftbukkit.conversations.ConversationTracker; import org.bukkit.craftbukkit.CraftEffect; import org.bukkit.craftbukkit.CraftOfflinePlayer; +import org.bukkit.craftbukkit.CraftParticle; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftSound; import org.bukkit.craftbukkit.CraftStatistic; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.advancement.CraftAdvancement; import org.bukkit.craftbukkit.advancement.CraftAdvancementProgress; +import org.bukkit.craftbukkit.block.CraftSign; +import org.bukkit.craftbukkit.block.data.CraftBlockData; +import org.bukkit.craftbukkit.conversations.ConversationTracker; import org.bukkit.craftbukkit.map.CraftMapView; import org.bukkit.craftbukkit.map.RenderData; import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; @@ -108,8 +115,6 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.messaging.StandardMessenger; import org.bukkit.scoreboard.Scoreboard; -import javax.annotation.Nullable; - @DelegateDeserialization(CraftOfflinePlayer.class) public class CraftPlayer extends CraftHumanEntity implements Player { private long firstPlayed = 0; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java index 335acc24d6..c671f098cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityLiving; import net.minecraft.server.EntityProjectile; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Projectile; import org.bukkit.projectiles.ProjectileSource; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java index 2701de75ad..647971d5e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPufferFish; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.entity.PufferFish; import org.bukkit.entity.EntityType; +import org.bukkit.entity.PufferFish; public class CraftPufferFish extends CraftFish implements PufferFish { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java index c124855e27..a75d7a3039 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java @@ -1,12 +1,12 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.World; import net.minecraft.server.EntityRabbit; import net.minecraft.server.PathfinderGoalSelector; +import net.minecraft.server.World; import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.EntityType; import org.bukkit.entity.Rabbit; -import org.bukkit.craftbukkit.CraftWorld; public class CraftRabbit extends CraftAnimals implements Rabbit { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java index 4d91f57605..0e4a9ce092 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySalmon; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.entity.Salmon; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Salmon; public class CraftSalmon extends CraftFish implements Salmon { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java index f7253554cb..107881a364 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySheep; - import net.minecraft.server.EnumColor; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java index d25b742e75..d18531378d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java @@ -1,6 +1,5 @@ package org.bukkit.craftbukkit.entity; -import com.google.common.base.Preconditions; import net.minecraft.server.EntityShulker; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java index ef9477519f..fe18098190 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySilverfish; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Silverfish; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java index 4ed89615fd..9fef81cc22 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySkeletonAbstract; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Skeleton; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java index 18e7ef80ac..00fbef360b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySlime; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Slime; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java index 2a07fe1b28..8412397483 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySpider; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Spider; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java index 433a7c6ac5..cb81d91fd9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySquid; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Squid; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java index dd9c659399..5de55b1347 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityLiving; import net.minecraft.server.EntityTNTPrimed; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java index eaaebeab83..2498fba315 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -1,13 +1,12 @@ package org.bukkit.craftbukkit.entity; +import java.util.UUID; import net.minecraft.server.EntityTameableAnimal; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.Creature; import org.bukkit.entity.Tameable; -import java.util.UUID; - public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creature { public CraftTameableAnimal(CraftServer server, EntityTameableAnimal entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java index 1af23a0def..2fb58a15e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.entity; +import com.google.common.collect.ImmutableList; import java.util.Collection; import net.minecraft.server.EntityPotion; import net.minecraft.server.MobEffect; import net.minecraft.server.PotionUtil; - import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.craftbukkit.CraftServer; @@ -15,8 +15,6 @@ import org.bukkit.entity.ThrownPotion; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffect; -import com.google.common.collect.ImmutableList; - public class CraftThrownPotion extends CraftProjectile implements ThrownPotion { public CraftThrownPotion(CraftServer server, EntityPotion entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java index b71b5d8658..dab0f75e10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java @@ -1,7 +1,10 @@ package org.bukkit.craftbukkit.entity; +import com.google.common.collect.ImmutableList; import java.util.List; - +import net.minecraft.server.EntityTippedArrow; +import net.minecraft.server.MobEffect; +import net.minecraft.server.MobEffectList; import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.craftbukkit.CraftServer; @@ -13,12 +16,6 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; -import com.google.common.collect.ImmutableList; - -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.MobEffect; -import net.minecraft.server.MobEffectList; - public class CraftTippedArrow extends CraftArrow implements TippedArrow { public CraftTippedArrow(CraftServer server, EntityTippedArrow entity) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java index 39e8d89bf4..2be8839863 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityWaterAnimal; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.WaterMob; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java index a3a8455a30..fb14179c34 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java @@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityWitch; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.entity.Witch; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Witch; public class CraftWitch extends CraftRaider implements Witch { public CraftWitch(CraftServer server, EntityWitch entity) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java index e93ecb076b..c28ccd0d98 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java @@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.entity; import com.google.common.base.Preconditions; import net.minecraft.server.EntityZombie; import net.minecraft.server.EntityZombieVillager; - import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Villager; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index d191b065a6..32efe87d87 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1,5 +1,9 @@ package org.bukkit.craftbukkit.event; +import com.google.common.base.Function; +import com.google.common.base.Functions; +import com.google.common.collect.Lists; +import com.mojang.datafixers.util.Either; import java.net.InetAddress; import java.util.ArrayList; import java.util.Collections; @@ -7,14 +11,55 @@ import java.util.EnumMap; import java.util.List; import java.util.Map; import javax.annotation.Nullable; - -import com.google.common.base.Function; -import com.google.common.base.Functions; -import com.google.common.collect.Lists; -import com.mojang.datafixers.util.Either; - -import net.minecraft.server.*; - +import net.minecraft.server.BlockPosition; +import net.minecraft.server.BlockPropertyInstrument; +import net.minecraft.server.ChatMessage; +import net.minecraft.server.ChatModifier; +import net.minecraft.server.Container; +import net.minecraft.server.DamageSource; +import net.minecraft.server.DimensionManager; +import net.minecraft.server.Entity; +import net.minecraft.server.EntityAnimal; +import net.minecraft.server.EntityAreaEffectCloud; +import net.minecraft.server.EntityDamageSource; +import net.minecraft.server.EntityDamageSourceIndirect; +import net.minecraft.server.EntityEnderCrystal; +import net.minecraft.server.EntityEnderDragon; +import net.minecraft.server.EntityExperienceOrb; +import net.minecraft.server.EntityFireworks; +import net.minecraft.server.EntityGhast; +import net.minecraft.server.EntityGolem; +import net.minecraft.server.EntityHuman; +import net.minecraft.server.EntityInsentient; +import net.minecraft.server.EntityItem; +import net.minecraft.server.EntityLiving; +import net.minecraft.server.EntityMonster; +import net.minecraft.server.EntityPlayer; +import net.minecraft.server.EntityPotion; +import net.minecraft.server.EntitySlime; +import net.minecraft.server.EntityTypes; +import net.minecraft.server.EntityWaterAnimal; +import net.minecraft.server.EnumDirection; +import net.minecraft.server.EnumHand; +import net.minecraft.server.EnumItemSlot; +import net.minecraft.server.Explosion; +import net.minecraft.server.GeneratorAccess; +import net.minecraft.server.IBlockData; +import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.IInventory; +import net.minecraft.server.ItemActionContext; +import net.minecraft.server.ItemStack; +import net.minecraft.server.Items; +import net.minecraft.server.MinecraftKey; +import net.minecraft.server.MobEffect; +import net.minecraft.server.MovingObjectPosition; +import net.minecraft.server.MovingObjectPositionBlock; +import net.minecraft.server.MovingObjectPositionEntity; +import net.minecraft.server.NPC; +import net.minecraft.server.PacketPlayInCloseWindow; +import net.minecraft.server.Unit; +import net.minecraft.server.World; +import net.minecraft.server.WorldServer; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.Server; @@ -38,8 +83,8 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.craftbukkit.util.CraftDamageSource; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.CraftNamespacedKey; +import org.bukkit.entity.AbstractHorse; import org.bukkit.entity.AreaEffectCloud; -import org.bukkit.entity.Arrow; import org.bukkit.entity.Bat; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; @@ -53,28 +98,88 @@ import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.entity.ThrownExpBottle; import org.bukkit.entity.ThrownPotion; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -import org.bukkit.event.block.*; +import org.bukkit.event.block.Action; +import org.bukkit.event.block.BlockDamageEvent; +import org.bukkit.event.block.BlockDropItemEvent; +import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockFormEvent; +import org.bukkit.event.block.BlockGrowEvent; +import org.bukkit.event.block.BlockIgniteEvent; import org.bukkit.event.block.BlockIgniteEvent.IgniteCause; -import org.bukkit.event.entity.*; +import org.bukkit.event.block.BlockMultiPlaceEvent; +import org.bukkit.event.block.BlockPhysicsEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.block.BlockRedstoneEvent; +import org.bukkit.event.block.BlockSpreadEvent; +import org.bukkit.event.block.EntityBlockFormEvent; +import org.bukkit.event.block.FluidLevelChangeEvent; +import org.bukkit.event.block.MoistureChangeEvent; +import org.bukkit.event.block.NotePlayEvent; +import org.bukkit.event.entity.AreaEffectCloudApplyEvent; +import org.bukkit.event.entity.BatToggleSleepEvent; +import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +import org.bukkit.event.entity.CreeperPowerEvent; +import org.bukkit.event.entity.EntityBreakDoorEvent; +import org.bukkit.event.entity.EntityBreedEvent; +import org.bukkit.event.entity.EntityChangeBlockEvent; +import org.bukkit.event.entity.EntityDamageByBlockEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDamageEvent.DamageModifier; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.entity.EntityPlaceEvent; +import org.bukkit.event.entity.EntityPotionEffectEvent; +import org.bukkit.event.entity.EntityShootBowEvent; +import org.bukkit.event.entity.EntitySpawnEvent; +import org.bukkit.event.entity.EntityTameEvent; +import org.bukkit.event.entity.EntityTargetEvent; +import org.bukkit.event.entity.EntityTargetLivingEntityEvent; +import org.bukkit.event.entity.EntityToggleGlideEvent; +import org.bukkit.event.entity.EntityToggleSwimEvent; +import org.bukkit.event.entity.EntityTransformEvent; +import org.bukkit.event.entity.ExpBottleEvent; +import org.bukkit.event.entity.FireworkExplodeEvent; +import org.bukkit.event.entity.FoodLevelChangeEvent; +import org.bukkit.event.entity.HorseJumpEvent; +import org.bukkit.event.entity.ItemDespawnEvent; +import org.bukkit.event.entity.ItemMergeEvent; +import org.bukkit.event.entity.ItemSpawnEvent; +import org.bukkit.event.entity.LingeringPotionSplashEvent; +import org.bukkit.event.entity.PigZapEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.entity.PlayerLeashEntityEvent; +import org.bukkit.event.entity.PotionSplashEvent; +import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryOpenEvent; import org.bukkit.event.inventory.PrepareAnvilEvent; import org.bukkit.event.inventory.PrepareItemCraftEvent; -import org.bukkit.event.player.*; +import org.bukkit.event.player.PlayerBedEnterEvent; import org.bukkit.event.player.PlayerBedEnterEvent.BedEnterResult; +import org.bukkit.event.player.PlayerBucketEmptyEvent; +import org.bukkit.event.player.PlayerBucketFillEvent; +import org.bukkit.event.player.PlayerEditBookEvent; +import org.bukkit.event.player.PlayerEvent; +import org.bukkit.event.player.PlayerExpChangeEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerItemBreakEvent; +import org.bukkit.event.player.PlayerItemMendEvent; +import org.bukkit.event.player.PlayerLevelChangeEvent; +import org.bukkit.event.player.PlayerRecipeDiscoverEvent; +import org.bukkit.event.player.PlayerStatisticIncrementEvent; +import org.bukkit.event.player.PlayerUnleashEntityEvent; import org.bukkit.event.server.ServerListPingEvent; +import org.bukkit.event.vehicle.VehicleCreateEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.meta.BookMeta; -import org.bukkit.entity.AbstractHorse; -import org.bukkit.entity.Vehicle; -import org.bukkit.event.vehicle.VehicleCreateEvent; import org.bukkit.potion.PotionEffect; public class CraftEventFactory { diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index bc1ca5ce21..c9d3f5f41b 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -3,12 +3,27 @@ package org.bukkit.craftbukkit.generator; import com.google.common.base.Preconditions; import java.util.List; import java.util.Random; - -import net.minecraft.server.*; - +import net.minecraft.server.BiomeBase; +import net.minecraft.server.Block; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.ChunkSection; +import net.minecraft.server.EnumCreatureType; +import net.minecraft.server.GeneratorAccess; +import net.minecraft.server.GeneratorSettingsDefault; +import net.minecraft.server.HeightMap; +import net.minecraft.server.IChunkAccess; +import net.minecraft.server.ITileEntity; +import net.minecraft.server.RegionLimitedWorldAccess; +import net.minecraft.server.StructureGenerator; +import net.minecraft.server.TileEntity; +import net.minecraft.server.World; +import net.minecraft.server.WorldGenFeatureConfiguration; +import net.minecraft.server.WorldGenStage; +import net.minecraft.server.WorldGenerator; +import net.minecraft.server.WorldServer; import org.bukkit.block.Biome; -import org.bukkit.generator.ChunkGenerator; import org.bukkit.craftbukkit.block.CraftBlock; +import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator.BiomeGrid; import org.bukkit.generator.ChunkGenerator.ChunkData; diff --git a/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java b/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java index 2089a5f524..77134d74bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java +++ b/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java @@ -1,13 +1,12 @@ package org.bukkit.craftbukkit.help; -import org.bukkit.command.CommandSender; -import org.bukkit.help.HelpMap; -import org.bukkit.help.HelpTopic; -import org.bukkit.help.IndexHelpTopic; - import java.util.HashSet; import java.util.LinkedList; import java.util.List; +import org.bukkit.command.CommandSender; +import org.bukkit.help.HelpMap; +import org.bukkit.help.HelpTopic; +import org.bukkit.help.IndexHelpTopic; /** */ diff --git a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java index 60a6221b4f..d3f17d4cde 100644 --- a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java +++ b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java @@ -1,19 +1,17 @@ package org.bukkit.craftbukkit.help; -import org.bukkit.ChatColor; -import org.bukkit.Server; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.help.HelpTopic; - import com.google.common.base.Charsets; - import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; import java.util.logging.Level; +import org.bukkit.ChatColor; +import org.bukkit.Server; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.help.HelpTopic; /** * HelpYamlReader is responsible for processing the contents of the help.yml file. diff --git a/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java b/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java index c7daccd5c0..be79875ad7 100644 --- a/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java +++ b/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java @@ -3,14 +3,28 @@ package org.bukkit.craftbukkit.help; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Collections2; - -import org.bukkit.command.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.TreeSet; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.MultipleCommandAlias; +import org.bukkit.command.PluginCommand; +import org.bukkit.command.PluginIdentifiableCommand; import org.bukkit.command.defaults.BukkitCommand; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.command.VanillaCommandWrapper; -import org.bukkit.help.*; - -import java.util.*; +import org.bukkit.help.GenericCommandHelpTopic; +import org.bukkit.help.HelpMap; +import org.bukkit.help.HelpTopic; +import org.bukkit.help.HelpTopicComparator; +import org.bukkit.help.HelpTopicFactory; +import org.bukkit.help.IndexHelpTopic; /** * Standard implementation of {@link HelpMap} for CraftBukkit servers. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java index 479c6f36f7..773d09ccb9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java @@ -1,12 +1,6 @@ package org.bukkit.craftbukkit.inventory; import net.minecraft.server.ChatComponentText; -import org.bukkit.craftbukkit.entity.CraftPlayer; -import org.bukkit.entity.HumanEntity; -import org.bukkit.event.inventory.InventoryType; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.InventoryView; - import net.minecraft.server.Container; import net.minecraft.server.ContainerAnvil; import net.minecraft.server.ContainerBeacon; @@ -33,6 +27,11 @@ import net.minecraft.server.ItemStack; import net.minecraft.server.PacketPlayOutOpenWindow; import net.minecraft.server.PlayerInventory; import net.minecraft.server.Slot; +import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.entity.HumanEntity; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; public class CraftContainer extends Container { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java index 3ed9e2bb09..424dc64522 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.inventory; import net.minecraft.server.EntityInsentient; import net.minecraft.server.EnumItemSlot; - import org.bukkit.craftbukkit.entity.CraftLivingEntity; import org.bukkit.entity.Entity; import org.bukkit.inventory.EntityEquipment; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 8c5e0d8977..3a2b57ae71 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.inventory; import java.util.HashMap; import java.util.List; import java.util.ListIterator; - import net.minecraft.server.IHopper; import net.minecraft.server.IInventory; import net.minecraft.server.InventoryCrafting; @@ -20,17 +19,15 @@ import net.minecraft.server.TileEntityFurnace; import net.minecraft.server.TileEntityLectern; import net.minecraft.server.TileEntityShulkerBox; import net.minecraft.server.TileEntitySmoker; - import org.apache.commons.lang.Validate; import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.craftbukkit.util.CraftLegacy; import org.bukkit.entity.HumanEntity; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; -import org.bukkit.Material; -import org.bukkit.craftbukkit.util.CraftChatMessage; -import org.bukkit.craftbukkit.util.CraftLegacy; public class CraftInventory implements Inventory { protected final IInventory inventory; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java index 86c89e8693..368355ac17 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java @@ -1,11 +1,10 @@ package org.bukkit.craftbukkit.inventory; +import net.minecraft.server.IInventory; import org.bukkit.block.BrewingStand; import org.bukkit.inventory.BrewerInventory; import org.bukkit.inventory.ItemStack; -import net.minecraft.server.IInventory; - public class CraftInventoryBrewer extends CraftInventory implements BrewerInventory { public CraftInventoryBrewer(IInventory inventory) { super(inventory); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java index 3a375e77da..c2513aa8e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java @@ -2,10 +2,8 @@ package org.bukkit.craftbukkit.inventory; import java.util.Arrays; import java.util.List; - -import net.minecraft.server.IRecipe; import net.minecraft.server.IInventory; - +import net.minecraft.server.IRecipe; import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java index 0e98e14011..a0a86661df 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java @@ -3,9 +3,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.server.ChatComponentText; - -import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.EntityHuman; +import net.minecraft.server.IInventory; +import net.minecraft.server.ItemStack; +import net.minecraft.server.NonNullList; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -13,12 +14,6 @@ import org.bukkit.entity.HumanEntity; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.InventoryHolder; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.IInventory; -import net.minecraft.server.ItemStack; -import net.minecraft.server.NonNullList; -import org.bukkit.craftbukkit.util.CraftChatMessage; - public class CraftInventoryCustom extends CraftInventory { public CraftInventoryCustom(InventoryHolder owner, InventoryType type) { super(new MinecraftInventory(owner, type)); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java index eb7b8fdde7..6665b771f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java @@ -1,13 +1,12 @@ package org.bukkit.craftbukkit.inventory; +import net.minecraft.server.InventoryLargeChest; +import org.bukkit.Location; import org.bukkit.block.DoubleChest; import org.bukkit.inventory.DoubleChestInventory; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; -import net.minecraft.server.InventoryLargeChest; -import org.bukkit.Location; - public class CraftInventoryDoubleChest extends CraftInventory implements DoubleChestInventory { private final CraftInventory left; private final CraftInventory right; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java index 37a631ebe4..8fd083f053 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java @@ -1,11 +1,10 @@ package org.bukkit.craftbukkit.inventory; +import net.minecraft.server.TileEntityFurnace; import org.bukkit.block.Furnace; import org.bukkit.inventory.FurnaceInventory; import org.bukkit.inventory.ItemStack; -import net.minecraft.server.TileEntityFurnace; - public class CraftInventoryFurnace extends CraftInventory implements FurnaceInventory { public CraftInventoryFurnace(TileEntityFurnace inventory) { super(inventory); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java index 2273f213cb..d5b90069c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java @@ -5,7 +5,6 @@ import net.minecraft.server.EntityPlayer; import net.minecraft.server.PacketPlayOutHeldItemSlot; import net.minecraft.server.PacketPlayOutSetSlot; import net.minecraft.server.PlayerInventory; - import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.entity.HumanEntity; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java index 16ec59ef37..4c6492a928 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java @@ -1,17 +1,15 @@ package org.bukkit.craftbukkit.inventory; +import net.minecraft.server.Container; import org.bukkit.GameMode; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.entity.HumanEntity; import org.bukkit.event.inventory.InventoryType; -import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.ItemStack; -import net.minecraft.server.Container; - public class CraftInventoryView extends InventoryView { private final Container container; private final CraftHumanEntity player; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java index 56dcd8aeec..f529367c8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -1,7 +1,7 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableSet; import java.util.Collection; - import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Material; @@ -11,8 +11,6 @@ import org.bukkit.inventory.ItemFactory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import com.google.common.collect.ImmutableSet; - public final class CraftItemFactory implements ItemFactory { static final Color DEFAULT_LEATHER_COLOR = Color.fromRGB(0xA06540); static final Collection KNOWN_NBT_ATTRIBUTE_NAMES; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index c4aa0152c8..73dd802205 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -1,30 +1,24 @@ package org.bukkit.craftbukkit.inventory; -import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; -import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS_ID; -import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS_LVL; - +import static org.bukkit.craftbukkit.inventory.CraftMetaItem.*; +import com.google.common.collect.ImmutableMap; import java.util.Map; - import net.minecraft.server.EnchantmentManager; import net.minecraft.server.Item; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; - import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.enchantments.CraftEnchantment; +import org.bukkit.craftbukkit.util.CraftLegacy; import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.material.MaterialData; -import com.google.common.collect.ImmutableMap; -import org.bukkit.craftbukkit.enchantments.CraftEnchantment; -import org.bukkit.craftbukkit.util.CraftLegacy; -import org.bukkit.craftbukkit.util.CraftNamespacedKey; - @DelegateDeserialization(ItemStack.class) public final class CraftItemStack extends ItemStack { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java index 92d496d0f3..bc9359001f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -1,7 +1,5 @@ package org.bukkit.craftbukkit.inventory; -import org.apache.commons.lang.Validate; -import net.minecraft.server.BlockPosition; import net.minecraft.server.ChatComponentText; import net.minecraft.server.EntityHuman; import net.minecraft.server.IChatBaseComponent; @@ -10,6 +8,7 @@ import net.minecraft.server.ItemStack; import net.minecraft.server.MerchantRecipe; import net.minecraft.server.MerchantRecipeList; import net.minecraft.server.World; +import org.apache.commons.lang.Validate; public class CraftMerchantCustom extends CraftMerchant { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index 0831e13e51..5e3cc48fca 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -1,27 +1,23 @@ package org.bukkit.craftbukkit.inventory; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagList; - -import org.apache.commons.lang.Validate; -import org.bukkit.Material; -import org.bukkit.configuration.serialization.DelegateDeserialization; -import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; -import org.bukkit.inventory.meta.BookMeta; - import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap.Builder; -import java.util.AbstractList; -import net.minecraft.server.IChatBaseComponent.ChatSerializer; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.IChatBaseComponent.ChatSerializer; +import net.minecraft.server.NBTTagCompound; +import net.minecraft.server.NBTTagList; import net.minecraft.server.NBTTagString; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftChatMessage; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.inventory.meta.BookMeta; @DelegateDeserialization(SerializableMeta.class) public class CraftMetaBook extends CraftMetaItem implements BookMeta { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java index 5050b60991..e6ca5e707c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -1,21 +1,18 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; - +import net.minecraft.server.IChatBaseComponent; +import net.minecraft.server.IChatBaseComponent.ChatSerializer; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; - +import net.minecraft.server.NBTTagString; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.BookMeta; -import com.google.common.collect.ImmutableMap.Builder; -import net.minecraft.server.IChatBaseComponent.ChatSerializer; -import net.minecraft.server.IChatBaseComponent; -import net.minecraft.server.NBTTagString; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaBookSigned extends CraftMetaBook implements BookMeta { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java index 8aa059157c..62b3dcc23c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java @@ -1,17 +1,14 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; - import net.minecraft.server.NBTTagCompound; - import org.bukkit.FireworkEffect; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.inventory.meta.FireworkEffectMeta; -import com.google.common.collect.ImmutableMap.Builder; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta { static final ItemMetaKey EXPLOSION = new ItemMetaKey("Explosion", "firework-effect"); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java index 8d44e55e66..e6cefff6ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java @@ -1,19 +1,16 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import java.util.HashMap; import java.util.Map; - import net.minecraft.server.NBTTagCompound; - import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.meta.EnchantmentStorageMeta; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorageMeta { static final ItemMetaKey STORED_ENCHANTMENTS = new ItemMetaKey("StoredEnchantments", "stored-enchants"); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java index b82e2fdf7c..ccf2ac1ed3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java @@ -1,13 +1,13 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap.Builder; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; - import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; - import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -20,9 +20,6 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.FireworkMeta; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap.Builder; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { /* diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 6fb4dec06f..b7d393e96f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1,5 +1,18 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Preconditions; +import com.google.common.base.Strings; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.Multimap; +import com.google.common.collect.SetMultimap; +import com.google.common.collect.Sets; +import com.google.gson.JsonParseException; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -7,28 +20,31 @@ import java.lang.annotation.Target; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; +import java.util.EnumSet; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.NoSuchElementException; - -import com.google.common.base.Preconditions; -import com.google.common.base.Strings; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.ImmutableMultimap; -import com.google.common.collect.Multimap; -import com.google.common.collect.SetMultimap; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import net.minecraft.server.EnumChatFormat; import net.minecraft.server.EnumItemSlot; import net.minecraft.server.GenericAttributes; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.NBTBase; +import net.minecraft.server.NBTCompressedStreamTools; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; import net.minecraft.server.NBTTagString; - +import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.Validate; import org.apache.commons.lang3.EnumUtils; import org.bukkit.Material; @@ -58,26 +74,6 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.Repairable; import org.bukkit.inventory.meta.tags.CustomItemTagContainer; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; -import com.google.gson.JsonParseException; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.LinkedHashMap; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; -import net.minecraft.server.EnumChatFormat; -import net.minecraft.server.NBTCompressedStreamTools; -import org.apache.commons.codec.binary.Base64; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - /** * Children must include the following: * diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index 469855983e..c7a159c821 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -1,20 +1,16 @@ package org.bukkit.craftbukkit.inventory; -import static org.bukkit.craftbukkit.inventory.CraftItemFactory.DEFAULT_LEATHER_COLOR; - +import static org.bukkit.craftbukkit.inventory.CraftItemFactory.*; +import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; - import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagInt; - import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; -import com.google.common.collect.ImmutableMap.Builder; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { static final ItemMetaKey COLOR = new ItemMetaKey("color"); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java index ec43877449..82b0c6aea7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java @@ -1,23 +1,20 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; import java.util.Map; - import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagInt; import net.minecraft.server.NBTTagString; - import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.MapMeta; import org.bukkit.map.MapView; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaMap extends CraftMetaItem implements MapMeta { static final ItemMetaKey MAP_SCALING = new ItemMetaKey("map_is_scaling", "scaling"); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java index 29fbdcc83f..821243a3a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -1,29 +1,25 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap.Builder; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; - import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagInt; import net.minecraft.server.NBTTagList; - import org.apache.commons.lang.Validate; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; +import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; -import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; -import org.bukkit.craftbukkit.potion.CraftPotionUtil; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap.Builder; @DelegateDeserialization(SerializableMeta.class) class CraftMetaPotion extends CraftMetaItem implements PotionMeta { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index 27f4d7761e..c63d0e6107 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -1,12 +1,12 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableMap.Builder; +import com.mojang.authlib.GameProfile; import java.util.Map; - import net.minecraft.server.GameProfileSerializer; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.TileEntitySkull; - import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; @@ -16,9 +16,6 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.inventory.meta.SkullMeta; -import com.google.common.collect.ImmutableMap.Builder; -import com.mojang.authlib.GameProfile; - @DelegateDeserialization(SerializableMeta.class) class CraftMetaSkull extends CraftMetaItem implements SkullMeta { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java index 81f9bb629a..d8914fa20b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -1,18 +1,13 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap.Builder; -import com.mojang.datafixers.Dynamic; import java.util.Map; -import net.minecraft.server.DataConverterTypes; -import net.minecraft.server.DynamicOpsNBT; import net.minecraft.server.MinecraftKey; -import net.minecraft.server.MinecraftServer; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.util.CraftLegacy; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.EntityType; import org.bukkit.inventory.meta.SpawnEggMeta; import org.bukkit.material.MaterialData; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java index f27df320b5..1ad3bc03c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java @@ -1,15 +1,13 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.collect.ImmutableMap; import java.util.Map; - import net.minecraft.server.NBTTagCompound; +import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; -import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; - -import com.google.common.collect.ImmutableMap; -import org.bukkit.DyeColor; import org.bukkit.craftbukkit.entity.CraftTropicalFish; +import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.TropicalFish; import org.bukkit.inventory.meta.TropicalFishBucketMeta; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java index 18743dda49..ef29599a89 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java @@ -1,6 +1,5 @@ package org.bukkit.craftbukkit.inventory; -import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; import net.minecraft.server.RecipeItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java index 1b6072213f..28d0ad025d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java @@ -1,12 +1,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.Map; - import net.minecraft.server.MinecraftServer; import net.minecraft.server.NonNullList; import net.minecraft.server.RecipeItemStack; import net.minecraft.server.ShapedRecipes; - import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java index 28875ec563..2c8c6b813f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java @@ -1,12 +1,10 @@ package org.bukkit.craftbukkit.inventory; import java.util.List; - import net.minecraft.server.MinecraftServer; import net.minecraft.server.NonNullList; import net.minecraft.server.RecipeItemStack; import net.minecraft.server.ShapelessRecipes; - import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java index b1cb56e2e0..1ae4eabc8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.inventory; import java.util.ListIterator; - import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java index 05685f84a8..a16fc6b03d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java @@ -5,12 +5,10 @@ import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.List; import net.minecraft.server.EntityHuman; -import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.IInventory; import net.minecraft.server.ItemStack; import org.bukkit.Location; import org.bukkit.craftbukkit.entity.CraftHumanEntity; -import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.entity.HumanEntity; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java index 297076ebf4..9221600b5a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java @@ -1,11 +1,9 @@ package org.bukkit.craftbukkit.inventory; import java.util.Iterator; - -import org.bukkit.inventory.Recipe; - import net.minecraft.server.IRecipe; import net.minecraft.server.MinecraftServer; +import org.bukkit.inventory.Recipe; public class RecipeIterator implements Iterator { private final Iterator> recipes; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java index 2a705913d2..f6fa0650fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java @@ -3,8 +3,6 @@ package org.bukkit.craftbukkit.inventory.util; import net.minecraft.server.DimensionManager; import net.minecraft.server.IInventory; import net.minecraft.server.MinecraftServer; -import net.minecraft.server.TileEntityBarrel; -import net.minecraft.server.TileEntityBeacon; import net.minecraft.server.TileEntityBlastFurnace; import net.minecraft.server.TileEntityBrewingStand; import net.minecraft.server.TileEntityDispenser; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java index e6c6a675d4..8a4fbdcae8 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java @@ -1,8 +1,7 @@ package org.bukkit.craftbukkit.map; -import net.minecraft.server.WorldMap; import net.minecraft.server.MapIcon; - +import net.minecraft.server.WorldMap; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.entity.Player; diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java index 8fe1208cd4..877c41a599 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java @@ -6,12 +6,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; - import net.minecraft.server.DimensionManager; import net.minecraft.server.MinecraftServer; import net.minecraft.server.WorldMap; import net.minecraft.server.WorldServer; - import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.craftbukkit.CraftWorld; diff --git a/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java b/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java index 6f7102f268..6441d0e043 100644 --- a/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java +++ b/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.metadata; +import java.util.List; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.metadata.MetadataStore; @@ -7,8 +8,6 @@ import org.bukkit.metadata.MetadataStoreBase; import org.bukkit.metadata.MetadataValue; import org.bukkit.plugin.Plugin; -import java.util.List; - /** * A BlockMetadataStore stores metadata values for {@link Block} objects. */ diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java index 14b79c13a4..648636b19d 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java @@ -1,21 +1,18 @@ package org.bukkit.craftbukkit.potion; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Maps; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; - import net.minecraft.server.MobEffect; import net.minecraft.server.PotionRegistry; - -import org.bukkit.potion.PotionEffectType; -import org.bukkit.potion.PotionType; import org.bukkit.potion.PotionBrewer; import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Maps; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.potion.PotionType; public class CraftPotionBrewer implements PotionBrewer { private static final Map> cache = Maps.newHashMap(); diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java index 9528bff1f9..6edfff3a01 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.potion; import net.minecraft.server.MobEffectList; - import org.bukkit.Color; import org.bukkit.potion.PotionEffectType; diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java index 2392b457f6..c1e0863c4b 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java @@ -3,14 +3,12 @@ package org.bukkit.craftbukkit.potion; import com.google.common.base.Preconditions; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; - import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; - +import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; -import org.bukkit.potion.PotionData; public class CraftPotionUtil { diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java index a791ae92f7..275cde801c 100644 --- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java +++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java @@ -1,7 +1,25 @@ package org.bukkit.craftbukkit.projectiles; import java.util.Random; - +import net.minecraft.server.BlockDispenser; +import net.minecraft.server.EntityArrow; +import net.minecraft.server.EntityEgg; +import net.minecraft.server.EntityEnderPearl; +import net.minecraft.server.EntityFireball; +import net.minecraft.server.EntityPotion; +import net.minecraft.server.EntityProjectile; +import net.minecraft.server.EntitySmallFireball; +import net.minecraft.server.EntitySnowball; +import net.minecraft.server.EntitySpectralArrow; +import net.minecraft.server.EntityThrownExpBottle; +import net.minecraft.server.EntityTippedArrow; +import net.minecraft.server.EntityTypes; +import net.minecraft.server.EnumDirection; +import net.minecraft.server.IPosition; +import net.minecraft.server.IProjectile; +import net.minecraft.server.MathHelper; +import net.minecraft.server.SourceBlock; +import net.minecraft.server.TileEntityDispenser; import org.apache.commons.lang.Validate; import org.bukkit.Material; import org.bukkit.block.Block; @@ -26,26 +44,6 @@ import org.bukkit.potion.PotionType; import org.bukkit.projectiles.BlockProjectileSource; import org.bukkit.util.Vector; -import net.minecraft.server.BlockDispenser; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityEnderPearl; -import net.minecraft.server.EntityFireball; -import net.minecraft.server.EntityPotion; -import net.minecraft.server.EntityProjectile; -import net.minecraft.server.EntitySmallFireball; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntitySpectralArrow; -import net.minecraft.server.EntityThrownExpBottle; -import net.minecraft.server.EntityTippedArrow; -import net.minecraft.server.EntityTypes; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.IPosition; -import net.minecraft.server.IProjectile; -import net.minecraft.server.MathHelper; -import net.minecraft.server.SourceBlock; -import net.minecraft.server.TileEntityDispenser; - public class CraftBlockProjectileSource implements BlockProjectileSource { private final TileEntityDispenser dispenserBlock; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java index 26ca44c5d6..8040e8d349 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java @@ -4,7 +4,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.logging.Level; - import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitWorker; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java index bb990e5117..b47ed943b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java @@ -6,7 +6,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; - import org.bukkit.plugin.Plugin; class CraftFuture extends CraftTask implements Future { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index 2780a10d1d..071fc631b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -15,7 +15,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.logging.Level; - import org.apache.commons.lang.Validate; import org.bukkit.plugin.IllegalPluginAccessException; import org.bukkit.plugin.Plugin; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java index 7dedd0222a..7cc9048517 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java @@ -1,12 +1,10 @@ package org.bukkit.craftbukkit.scoreboard; +import com.google.common.collect.ImmutableMap; import java.util.Map; - import net.minecraft.server.IScoreboardCriteria; import net.minecraft.server.ScoreboardObjective; -import com.google.common.collect.ImmutableMap; - final class CraftCriteria { static final Map DEFAULTS; static final CraftCriteria DUMMY; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java index dcbbea38a2..b22b506beb 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java @@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.scoreboard; import net.minecraft.server.Scoreboard; import net.minecraft.server.ScoreboardObjective; - import org.apache.commons.lang.Validate; import org.bukkit.OfflinePlayer; import org.bukkit.craftbukkit.util.CraftChatMessage; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java index f378113cec..3ed19d4db2 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java @@ -1,11 +1,9 @@ package org.bukkit.craftbukkit.scoreboard; import java.util.Map; - import net.minecraft.server.Scoreboard; import net.minecraft.server.ScoreboardObjective; import net.minecraft.server.ScoreboardScore; - import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index 7320f339fd..c74b8330ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -1,24 +1,22 @@ package org.bukkit.craftbukkit.scoreboard; +import com.google.common.base.Function; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; import java.util.Collection; import net.minecraft.server.Scoreboard; import net.minecraft.server.ScoreboardObjective; import net.minecraft.server.ScoreboardTeam; - import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; +import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.RenderType; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Team; -import com.google.common.base.Function; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; -import org.bukkit.craftbukkit.util.CraftChatMessage; - public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { final Scoreboard board; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java index cac87d3069..afbc1a9603 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java @@ -1,14 +1,11 @@ package org.bukkit.craftbukkit.scoreboard; -import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.function.Consumer; - import net.minecraft.server.EntityPlayer; import net.minecraft.server.IScoreboardCriteria; import net.minecraft.server.MinecraftServer; @@ -19,7 +16,6 @@ import net.minecraft.server.ScoreboardObjective; import net.minecraft.server.ScoreboardScore; import net.minecraft.server.ScoreboardServer; import net.minecraft.server.ScoreboardTeam; - import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.util.WeakCollection; diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java index 207ffdd252..edd147fe65 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java @@ -1,13 +1,11 @@ package org.bukkit.craftbukkit.scoreboard; +import com.google.common.collect.ImmutableBiMap; import net.minecraft.server.IScoreboardCriteria; import net.minecraft.server.Scoreboard; - import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.RenderType; -import com.google.common.collect.ImmutableBiMap; - class CraftScoreboardTranslations { static final int MAX_DISPLAY_SLOT = 3; static ImmutableBiMap SLOTS = ImmutableBiMap.of( diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index 4154b754e7..565b4e0681 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -1,21 +1,18 @@ package org.bukkit.craftbukkit.scoreboard; +import com.google.common.collect.ImmutableSet; import java.util.Set; - +import net.minecraft.server.ScoreboardTeam; +import net.minecraft.server.ScoreboardTeamBase; import net.minecraft.server.ScoreboardTeamBase.EnumNameTagVisibility; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; +import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; -import com.google.common.collect.ImmutableSet; - -import net.minecraft.server.ScoreboardTeam; -import net.minecraft.server.ScoreboardTeamBase; -import org.bukkit.ChatColor; -import org.bukkit.craftbukkit.util.CraftChatMessage; - final class CraftTeam extends CraftScoreboardComponent implements Team { private final ScoreboardTeam team; diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java index a65c0500cd..583761c314 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -4,11 +4,9 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Set; - import net.minecraft.server.BlockPosition; import net.minecraft.server.IBlockData; import net.minecraft.server.World; - import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.block.CraftBlockState; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java index d054405e48..99489aebe5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -1,21 +1,19 @@ package org.bukkit.craftbukkit.util; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; - import net.minecraft.server.ChatClickable; +import net.minecraft.server.ChatClickable.EnumClickAction; import net.minecraft.server.ChatComponentText; +import net.minecraft.server.ChatMessage; import net.minecraft.server.ChatModifier; import net.minecraft.server.EnumChatFormat; -import net.minecraft.server.ChatClickable.EnumClickAction; import net.minecraft.server.IChatBaseComponent; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; -import net.minecraft.server.ChatMessage; import org.bukkit.ChatColor; public final class CraftChatMessage { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 853dc1c003..b58c3a3ed4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -14,7 +14,6 @@ import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; - import net.minecraft.server.AdvancementDataWorld; import net.minecraft.server.Block; import net.minecraft.server.ChatDeserializer; @@ -30,7 +29,6 @@ import net.minecraft.server.MojangsonParser; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.SharedConstants; - import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.NamespacedKey; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java index ffd2e64aa2..5c978a261c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java @@ -1,5 +1,11 @@ package org.bukkit.craftbukkit.util; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.MovingObjectPosition; +import net.minecraft.server.MovingObjectPosition.EnumMovingObjectType; +import net.minecraft.server.MovingObjectPositionBlock; +import net.minecraft.server.MovingObjectPositionEntity; +import net.minecraft.server.Vec3D; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -7,12 +13,6 @@ import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.entity.Entity; import org.bukkit.util.RayTraceResult; import org.bukkit.util.Vector; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.MovingObjectPosition; -import net.minecraft.server.MovingObjectPosition.EnumMovingObjectType; -import net.minecraft.server.MovingObjectPositionBlock; -import net.minecraft.server.MovingObjectPositionEntity; -import net.minecraft.server.Vec3D; public class CraftRayTraceResult { diff --git a/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java b/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java index 74ce4b2ec7..100b8566d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java @@ -1,13 +1,12 @@ package org.bukkit.craftbukkit.util; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.LogRecord; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ForwardLogHandler extends ConsoleHandler { private Map cachedLoggers = new ConcurrentHashMap(); diff --git a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java index 457d19e9c1..f847a9dd62 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java +++ b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java @@ -4,7 +4,6 @@ import java.util.HashSet; import java.util.List; import net.minecraft.server.EntityPlayer; import net.minecraft.server.MinecraftServer; - import org.bukkit.entity.Player; public class LazyPlayerSet extends LazyHashSet { diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java index 336cc967b2..f239cd6236 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java @@ -1,11 +1,11 @@ package org.bukkit.craftbukkit.util; +import com.mojang.util.QueueLogAppender; import java.io.IOException; import java.io.OutputStream; import java.util.logging.Level; import java.util.logging.Logger; import jline.console.ConsoleReader; -import com.mojang.util.QueueLogAppender; import org.bukkit.craftbukkit.Main; import org.fusesource.jansi.Ansi; import org.fusesource.jansi.Ansi.Erase; diff --git a/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java b/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java index 7e7363f527..712f2e10d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java +++ b/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java @@ -5,7 +5,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.NoSuchElementException; - import org.apache.commons.lang.Validate; public final class WeakCollection implements Collection { diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java index c54d3efd6a..6bea250b86 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.util.permissions; import org.bukkit.permissions.Permission; -import org.bukkit.permissions.PermissionDefault; import org.bukkit.util.permissions.DefaultPermissions; public final class CraftDefaultPermissions { diff --git a/src/test/java/org/bukkit/ArtTest.java b/src/test/java/org/bukkit/ArtTest.java index 1eab951037..39e3d2150a 100644 --- a/src/test/java/org/bukkit/ArtTest.java +++ b/src/test/java/org/bukkit/ArtTest.java @@ -1,23 +1,19 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; +import com.google.common.collect.Lists; import java.util.Collections; import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; - import net.minecraft.server.IRegistry; import net.minecraft.server.MinecraftKey; import net.minecraft.server.Paintings; - import org.bukkit.craftbukkit.CraftArt; -import org.junit.Test; - -import com.google.common.collect.Lists; import org.bukkit.support.AbstractTestingBase; +import org.junit.Test; public class ArtTest extends AbstractTestingBase { private static final int UNIT_MULTIPLIER = 16; diff --git a/src/test/java/org/bukkit/BlockDataTest.java b/src/test/java/org/bukkit/BlockDataTest.java index 11b6006960..00b8ad356f 100644 --- a/src/test/java/org/bukkit/BlockDataTest.java +++ b/src/test/java/org/bukkit/BlockDataTest.java @@ -1,5 +1,6 @@ package org.bukkit; +import static org.hamcrest.Matchers.*; import net.minecraft.server.BlockCake; import net.minecraft.server.BlockChest; import net.minecraft.server.Blocks; @@ -10,7 +11,6 @@ import org.bukkit.block.data.type.Cake; import org.bukkit.block.data.type.Chest; import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.support.AbstractTestingBase; -import static org.hamcrest.Matchers.*; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/bukkit/ChatTest.java b/src/test/java/org/bukkit/ChatTest.java index 97467c26fb..11a78cf74d 100644 --- a/src/test/java/org/bukkit/ChatTest.java +++ b/src/test/java/org/bukkit/ChatTest.java @@ -1,13 +1,12 @@ package org.bukkit; +import static org.junit.Assert.*; import net.minecraft.server.EnumChatFormat; import net.minecraft.server.IChatBaseComponent; import org.bukkit.craftbukkit.util.CraftChatMessage; import org.junit.Assert; import org.junit.Test; -import static org.junit.Assert.assertEquals; - public class ChatTest { @Test diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java index 45a5caed2b..50388c34a1 100644 --- a/src/test/java/org/bukkit/DyeColorsTest.java +++ b/src/test/java/org/bukkit/DyeColorsTest.java @@ -1,13 +1,10 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; - import net.minecraft.server.EnumColor; - import org.bukkit.support.AbstractTestingBase; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/src/test/java/org/bukkit/MaterialTest.java b/src/test/java/org/bukkit/MaterialTest.java index 8c9724478f..3b905b73af 100644 --- a/src/test/java/org/bukkit/MaterialTest.java +++ b/src/test/java/org/bukkit/MaterialTest.java @@ -1,22 +1,18 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; +import com.google.common.collect.Maps; import java.util.Collections; +import java.util.Iterator; import java.util.Map; - import net.minecraft.server.IRegistry; import net.minecraft.server.Item; import net.minecraft.server.MinecraftKey; - +import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; -import com.google.common.collect.Maps; -import java.util.Iterator; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; - public class MaterialTest extends AbstractTestingBase { @Test diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index 34b388b855..b3dc09cd01 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -1,17 +1,26 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; +import com.google.common.collect.Lists; import java.util.List; - +import java.util.Map; +import net.minecraft.server.Block; +import net.minecraft.server.BlockAccessAir; import net.minecraft.server.BlockFalling; import net.minecraft.server.BlockFire; +import net.minecraft.server.BlockPosition; +import net.minecraft.server.Blocks; +import net.minecraft.server.EntityHuman; +import net.minecraft.server.EnumHand; +import net.minecraft.server.IBlockData; import net.minecraft.server.Item; import net.minecraft.server.ItemRecord; +import net.minecraft.server.MovingObjectPositionBlock; import net.minecraft.server.TileEntityFurnace; - import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.enchantments.EnchantmentTarget; import org.bukkit.inventory.ItemStack; import org.bukkit.support.AbstractTestingBase; import org.bukkit.support.Util; @@ -22,20 +31,6 @@ import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; -import com.google.common.collect.Lists; -import java.util.Map; -import net.minecraft.server.Block; -import net.minecraft.server.BlockAccessAir; -import net.minecraft.server.BlockPosition; -import net.minecraft.server.Blocks; -import net.minecraft.server.EntityHuman; -import net.minecraft.server.EnumDirection; -import net.minecraft.server.EnumHand; -import net.minecraft.server.IBlockData; -import net.minecraft.server.MovingObjectPositionBlock; -import org.bukkit.craftbukkit.util.CraftMagicNumbers; -import org.bukkit.enchantments.EnchantmentTarget; - @RunWith(Parameterized.class) public class PerMaterialTest extends AbstractTestingBase { private static Map fireValues; diff --git a/src/test/java/org/bukkit/SoundTest.java b/src/test/java/org/bukkit/SoundTest.java index da8c3dcbb6..f8e8744343 100644 --- a/src/test/java/org/bukkit/SoundTest.java +++ b/src/test/java/org/bukkit/SoundTest.java @@ -1,11 +1,9 @@ package org.bukkit; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; import net.minecraft.server.IRegistry; import net.minecraft.server.MinecraftKey; - -import static org.junit.Assert.*; -import static org.hamcrest.Matchers.*; - import org.bukkit.craftbukkit.CraftSound; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java index 574e3b69b7..fe8cad4aab 100644 --- a/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java +++ b/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java @@ -1,19 +1,16 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; +import com.google.common.collect.HashMultiset; import net.minecraft.server.EntityTypes; import net.minecraft.server.IRegistry; import net.minecraft.server.StatisticWrapper; - -import org.bukkit.entity.EntityType; import org.bukkit.craftbukkit.CraftStatistic; +import org.bukkit.entity.EntityType; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; -import com.google.common.collect.HashMultiset; - public class StatisticsAndAchievementsTest extends AbstractTestingBase { @Test diff --git a/src/test/java/org/bukkit/WorldTypeTest.java b/src/test/java/org/bukkit/WorldTypeTest.java index 4d35a1064b..f71d6b8231 100644 --- a/src/test/java/org/bukkit/WorldTypeTest.java +++ b/src/test/java/org/bukkit/WorldTypeTest.java @@ -1,8 +1,7 @@ package org.bukkit; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import net.minecraft.server.WorldType; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java b/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java index 4b5a85302e..b59b28aa9c 100644 --- a/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java +++ b/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java @@ -1,10 +1,10 @@ package org.bukkit.craftbukkit.generator; +import static org.junit.Assert.*; import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; -import static org.junit.Assert.*; public class ChunkDataTest extends AbstractTestingBase { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java b/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java index 2a0791bb98..fe62feb088 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java @@ -1,11 +1,9 @@ package org.bukkit.craftbukkit.inventory; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; - import org.bukkit.Material; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java index 1e5c3ef2d0..7580eb290d 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java @@ -1,12 +1,9 @@ package org.bukkit.craftbukkit.inventory; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.ArrayUtils; - import org.bukkit.Material; import org.bukkit.inventory.ItemFactory; import org.bukkit.inventory.ItemStack; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java index f91e393271..4d44cf5b4b 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java @@ -1,18 +1,15 @@ package org.bukkit.craftbukkit.inventory; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.HashSet; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; - import net.minecraft.server.IAttribute; import net.minecraft.server.IDynamicTexture; - import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java index 834fb297b4..cefedd7d1e 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java @@ -1,11 +1,10 @@ package org.bukkit.craftbukkit.inventory; -import java.lang.reflect.Method; -import org.bukkit.Material; -import org.junit.Test; - import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; +import java.lang.reflect.Method; +import org.bukkit.Material; +import org.junit.Test; public class ItemMetaCloneTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCustomValueTest.java index fa303d1fa7..f2962949b7 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCustomValueTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCustomValueTest.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.inventory; +import static org.junit.Assert.*; import java.io.StringReader; import java.lang.reflect.Array; import java.nio.ByteBuffer; @@ -21,10 +22,6 @@ import org.bukkit.inventory.meta.tags.CustomItemTagContainer; import org.bukkit.inventory.meta.tags.ItemTagAdapterContext; import org.bukkit.inventory.meta.tags.ItemTagType; import org.bukkit.support.AbstractTestingBase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java index f1b4ec0da8..fc4a7ceb79 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java @@ -2,12 +2,10 @@ package org.bukkit.craftbukkit.inventory; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; - import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; - import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.craftbukkit.Overridden; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java index 88e8165af2..176b8f5284 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -1,39 +1,34 @@ package org.bukkit.craftbukkit.inventory; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; - import net.minecraft.server.Block; import net.minecraft.server.IRegistry; import net.minecraft.server.ITileEntity; import net.minecraft.server.Item; import net.minecraft.server.ItemBlock; import net.minecraft.server.ItemBlockWallable; -import net.minecraft.server.NBTTagInt; - import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.DyeColor; import org.bukkit.FireworkEffect; -import org.bukkit.Material; import org.bukkit.FireworkEffect.Type; +import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeModifier; import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.PatternType; import org.bukkit.craftbukkit.block.data.CraftBlockData; -import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; -import org.bukkit.craftbukkit.inventory.ItemStackTest.StackWrapper; import org.bukkit.craftbukkit.inventory.ItemStackTest.BukkitWrapper; import org.bukkit.craftbukkit.inventory.ItemStackTest.CraftWrapper; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackProvider; +import org.bukkit.craftbukkit.inventory.ItemStackTest.StackWrapper; import org.bukkit.enchantments.Enchantment; -import org.bukkit.entity.EntityType; import org.bukkit.entity.TropicalFish; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BannerMeta; @@ -48,10 +43,9 @@ import org.bukkit.inventory.meta.KnowledgeBookMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; import org.bukkit.inventory.meta.MapMeta; import org.bukkit.inventory.meta.PotionMeta; -import org.bukkit.inventory.meta.SpawnEggMeta; import org.bukkit.inventory.meta.TropicalFishBucketMeta; -import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionData; +import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java index c16c5611d5..b07c77da80 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BookMeta; @@ -10,8 +10,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackBookTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java index a0499b8ad3..4a7720bc0e 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; @@ -11,8 +11,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackEnchantStorageTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java index fbfce58c5f..287beadb76 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Color; import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect.Type; @@ -13,8 +13,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackFireworkChargeTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java index 55e6629bc4..f68270e29b 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java @@ -1,20 +1,18 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Color; import org.bukkit.FireworkEffect; -import org.bukkit.Material; import org.bukkit.FireworkEffect.Type; +import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.FireworkMeta; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackFireworkTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java index 6d68e1f468..32e60ed9ec 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java @@ -1,19 +1,16 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.LeatherArmorMeta; - import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackLeatherTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java index 99db06d06f..4dd2ab8c5e 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; @@ -11,8 +11,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackLoreEnchantmentTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java index c13f6d5790..1d2de6f93e 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.MapMeta; @@ -10,8 +10,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackMapTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java index c1f9fb745b..227c19666a 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; @@ -11,8 +11,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackPotionsTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java index 1561bf885d..cfca718036 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java @@ -1,8 +1,8 @@ package org.bukkit.craftbukkit.inventory; +import com.google.common.base.Joiner; import java.util.Arrays; import java.util.List; - import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; @@ -10,8 +10,6 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import com.google.common.base.Joiner; - @RunWith(Parameterized.class) public class ItemStackSkullTest extends ItemStackTest { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java index 058730e117..5f9385a8bb 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java @@ -1,9 +1,10 @@ package org.bukkit.craftbukkit.inventory; -import static org.bukkit.support.Matchers.sameHash; -import static org.junit.Assert.*; +import static org.bukkit.support.Matchers.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; +import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableList; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -14,7 +15,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; - import org.bukkit.Material; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; @@ -31,9 +31,6 @@ import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableList; - @RunWith(Parameterized.class) public class ItemStackTest extends AbstractTestingBase { abstract static class StackProvider { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java index 5a43fd867f..5f5781230d 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java @@ -1,10 +1,8 @@ package org.bukkit.craftbukkit.inventory; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; - +import static org.junit.Assert.*; import net.minecraft.server.Enchantments; - import org.bukkit.inventory.ItemStack; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java index fc0da1a9bf..806f879579 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java @@ -1,11 +1,11 @@ package org.bukkit.craftbukkit.inventory; +import static org.junit.Assert.*; import net.minecraft.server.ItemStack; import net.minecraft.server.Items; import net.minecraft.server.PlayerInventory; import org.bukkit.support.AbstractTestingBase; import org.junit.Test; -import static org.junit.Assert.*; public class PlayerInventoryTest extends AbstractTestingBase { diff --git a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java index 3c42440456..5564e1df92 100644 --- a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java +++ b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java @@ -1,12 +1,11 @@ package org.bukkit.entity; +import static junit.framework.TestCase.*; import net.minecraft.server.DragonControllerPhase; import org.bukkit.craftbukkit.entity.CraftEnderDragon; import org.junit.Assert; import org.junit.Test; -import static junit.framework.TestCase.assertNotNull; - public class EnderDragonPhaseTest { @Test diff --git a/src/test/java/org/bukkit/entity/TropicalFishTest.java b/src/test/java/org/bukkit/entity/TropicalFishTest.java index b65dc340a8..aa70881a77 100644 --- a/src/test/java/org/bukkit/entity/TropicalFishTest.java +++ b/src/test/java/org/bukkit/entity/TropicalFishTest.java @@ -1,11 +1,10 @@ package org.bukkit.entity; -import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; import org.bukkit.DyeColor; import org.bukkit.craftbukkit.entity.CraftTropicalFish; import org.bukkit.entity.TropicalFish.Pattern; - import org.junit.Test; public class TropicalFishTest { diff --git a/src/test/java/org/bukkit/potion/PotionTest.java b/src/test/java/org/bukkit/potion/PotionTest.java index f6c23ebba4..a7e276f9ab 100644 --- a/src/test/java/org/bukkit/potion/PotionTest.java +++ b/src/test/java/org/bukkit/potion/PotionTest.java @@ -1,12 +1,10 @@ package org.bukkit.potion; import static org.junit.Assert.*; - import java.util.EnumMap; import java.util.List; import java.util.Map; import net.minecraft.server.IRegistry; - import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; import net.minecraft.server.PotionRegistry; diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java index c9fd5e277b..c3b782a674 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java @@ -5,7 +5,6 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.HashMap; import java.util.logging.Logger; - import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.NamespacedKey;