From 75b7fdac582d904307b9aa5f1994d88eefa571b4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 19 Oct 2016 21:15:00 +1100 Subject: [PATCH] Fix stray imports in proxy --- .../main/java/net/md_5/bungee/BungeeCord.java | 35 +++++++++++-------- .../java/net/md_5/bungee/BungeeTitle.java | 1 - .../net/md_5/bungee/PlayerInfoSerializer.java | 3 +- .../java/net/md_5/bungee/ServerConnector.java | 1 - .../md_5/bungee/connection/PingHandler.java | 1 - .../bungee/connection/UpstreamBridge.java | 12 +++---- .../md_5/bungee/forge/ForgeClientHandler.java | 1 - .../forge/ForgeClientHandshakeState.java | 5 ++- .../net/md_5/bungee/forge/ForgeUtils.java | 4 +-- .../net/md_5/bungee/netty/HandlerBoss.java | 4 +-- .../net/md_5/bungee/netty/PipelineUtils.java | 1 - .../bungee/netty/cipher/CipherDecoder.java | 2 +- .../main/java/net/md_5/bungee/tab/Global.java | 1 - .../net/md_5/bungee/tab/ServerUnique.java | 2 -- .../bungee/util/BoundedArrayListTest.java | 2 -- 15 files changed, 34 insertions(+), 41 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 9825b993..159dab67 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -7,21 +7,9 @@ import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import com.google.gson.GsonBuilder; -import net.md_5.bungee.api.Favicon; -import net.md_5.bungee.api.ServerPing; -import net.md_5.bungee.api.Title; -import net.md_5.bungee.api.chat.TranslatableComponent; -import net.md_5.bungee.chat.TextComponentSerializer; -import net.md_5.bungee.chat.TranslatableComponentSerializer; -import net.md_5.bungee.module.ModuleManager; -import net.md_5.bungee.api.chat.BaseComponent; -import net.md_5.bungee.api.chat.TextComponent; -import net.md_5.bungee.chat.ComponentSerializer; -import net.md_5.bungee.log.BungeeLogger; -import net.md_5.bungee.scheduler.BungeeScheduler; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; @@ -31,7 +19,6 @@ import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.util.ResourceLeakDetector; -import net.md_5.bungee.conf.Configuration; import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -62,25 +49,43 @@ import lombok.Getter; import lombok.Setter; import lombok.Synchronized; import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.Favicon; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ReconnectHandler; +import net.md_5.bungee.api.ServerPing; +import net.md_5.bungee.api.Title; +import net.md_5.bungee.api.chat.BaseComponent; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.chat.TranslatableComponent; import net.md_5.bungee.api.config.ConfigurationAdapter; import net.md_5.bungee.api.config.ListenerInfo; import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.plugin.Plugin; import net.md_5.bungee.api.plugin.PluginManager; -import net.md_5.bungee.command.*; +import net.md_5.bungee.chat.ComponentSerializer; +import net.md_5.bungee.chat.TextComponentSerializer; +import net.md_5.bungee.chat.TranslatableComponentSerializer; +import net.md_5.bungee.command.CommandBungee; +import net.md_5.bungee.command.CommandEnd; +import net.md_5.bungee.command.CommandIP; +import net.md_5.bungee.command.CommandPerms; +import net.md_5.bungee.command.CommandReload; +import net.md_5.bungee.command.ConsoleCommandSender; import net.md_5.bungee.compress.CompressFactory; +import net.md_5.bungee.conf.Configuration; import net.md_5.bungee.conf.YamlConfig; import net.md_5.bungee.forge.ForgeConstants; +import net.md_5.bungee.log.BungeeLogger; import net.md_5.bungee.log.LoggingOutputStream; +import net.md_5.bungee.module.ModuleManager; import net.md_5.bungee.netty.PipelineUtils; import net.md_5.bungee.protocol.DefinedPacket; import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.Chat; import net.md_5.bungee.protocol.packet.PluginMessage; import net.md_5.bungee.query.RemoteQuery; +import net.md_5.bungee.scheduler.BungeeScheduler; import net.md_5.bungee.util.CaseInsensitiveMap; import org.fusesource.jansi.AnsiConsole; diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeTitle.java b/proxy/src/main/java/net/md_5/bungee/BungeeTitle.java index 1e11f687..494213db 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeTitle.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeTitle.java @@ -5,7 +5,6 @@ import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.chat.ComponentSerializer; import net.md_5.bungee.protocol.DefinedPacket; -import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.Title.Action; public class BungeeTitle implements Title diff --git a/proxy/src/main/java/net/md_5/bungee/PlayerInfoSerializer.java b/proxy/src/main/java/net/md_5/bungee/PlayerInfoSerializer.java index dc49bb69..491cf1a1 100644 --- a/proxy/src/main/java/net/md_5/bungee/PlayerInfoSerializer.java +++ b/proxy/src/main/java/net/md_5/bungee/PlayerInfoSerializer.java @@ -7,10 +7,9 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; -import net.md_5.bungee.api.ServerPing; - import java.lang.reflect.Type; import java.util.UUID; +import net.md_5.bungee.api.ServerPing; public class PlayerInfoSerializer implements JsonSerializer, JsonDeserializer { diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java index e599e7e0..72ca169e 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -3,7 +3,6 @@ package net.md_5.bungee; import com.google.common.base.Preconditions; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; - import java.util.Queue; import java.util.Set; import java.util.UUID; diff --git a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java index 30fc7567..3cd5cf69 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java @@ -14,7 +14,6 @@ import net.md_5.bungee.netty.PipelineUtils; import net.md_5.bungee.protocol.MinecraftDecoder; import net.md_5.bungee.protocol.MinecraftEncoder; import net.md_5.bungee.protocol.Protocol; -import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.Handshake; import net.md_5.bungee.protocol.packet.StatusRequest; import net.md_5.bungee.protocol.packet.StatusResponse; diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index 88b179d3..8ccc7c56 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -1,6 +1,8 @@ package net.md_5.bungee.connection; import com.google.common.base.Preconditions; +import java.util.ArrayList; +import java.util.List; import net.md_5.bungee.BungeeCord; import net.md_5.bungee.UserConnection; import net.md_5.bungee.Util; @@ -10,18 +12,16 @@ import net.md_5.bungee.api.event.ChatEvent; import net.md_5.bungee.api.event.PlayerDisconnectEvent; import net.md_5.bungee.api.event.PluginMessageEvent; import net.md_5.bungee.api.event.TabCompleteEvent; +import net.md_5.bungee.forge.ForgeConstants; import net.md_5.bungee.netty.ChannelWrapper; import net.md_5.bungee.netty.PacketHandler; import net.md_5.bungee.protocol.PacketWrapper; -import net.md_5.bungee.protocol.packet.KeepAlive; import net.md_5.bungee.protocol.packet.Chat; -import net.md_5.bungee.protocol.packet.PlayerListItem; -import net.md_5.bungee.protocol.packet.TabCompleteRequest; import net.md_5.bungee.protocol.packet.ClientSettings; +import net.md_5.bungee.protocol.packet.KeepAlive; +import net.md_5.bungee.protocol.packet.PlayerListItem; import net.md_5.bungee.protocol.packet.PluginMessage; -import java.util.ArrayList; -import java.util.List; -import net.md_5.bungee.forge.ForgeConstants; +import net.md_5.bungee.protocol.packet.TabCompleteRequest; import net.md_5.bungee.protocol.packet.TabCompleteResponse; public class UpstreamBridge extends PacketHandler diff --git a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java index 314fd436..673497e5 100644 --- a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java @@ -7,7 +7,6 @@ import lombok.Getter; import lombok.NonNull; import lombok.RequiredArgsConstructor; import lombok.Setter; -import net.md_5.bungee.BungeeCord; import net.md_5.bungee.UserConnection; import net.md_5.bungee.protocol.packet.PluginMessage; diff --git a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandshakeState.java b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandshakeState.java index d025863c..52429265 100644 --- a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandshakeState.java +++ b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandshakeState.java @@ -3,7 +3,6 @@ package net.md_5.bungee.forge; import java.util.Map; import net.md_5.bungee.ServerConnector; import net.md_5.bungee.UserConnection; -import net.md_5.bungee.forge.ForgeLogger.LogDirection; import net.md_5.bungee.protocol.packet.PluginMessage; /** @@ -28,7 +27,7 @@ enum ForgeClientHandshakeState implements IForgeClientPacketHandler diff --git a/proxy/src/main/java/net/md_5/bungee/tab/Global.java b/proxy/src/main/java/net/md_5/bungee/tab/Global.java index 7cbe1bb3..0cf1d218 100644 --- a/proxy/src/main/java/net/md_5/bungee/tab/Global.java +++ b/proxy/src/main/java/net/md_5/bungee/tab/Global.java @@ -6,7 +6,6 @@ import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.chat.ComponentSerializer; import net.md_5.bungee.connection.LoginResult; -import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.PlayerListItem; import java.util.Collection; diff --git a/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java b/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java index 0f7edadd..daf12f74 100644 --- a/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java +++ b/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java @@ -3,9 +3,7 @@ package net.md_5.bungee.tab; import java.util.Collection; import java.util.HashSet; import java.util.UUID; - import net.md_5.bungee.api.connection.ProxiedPlayer; -import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.PlayerListItem; public class ServerUnique extends TabList diff --git a/proxy/src/test/java/net/md_5/bungee/util/BoundedArrayListTest.java b/proxy/src/test/java/net/md_5/bungee/util/BoundedArrayListTest.java index a4fee37e..d66305d9 100644 --- a/proxy/src/test/java/net/md_5/bungee/util/BoundedArrayListTest.java +++ b/proxy/src/test/java/net/md_5/bungee/util/BoundedArrayListTest.java @@ -3,8 +3,6 @@ package net.md_5.bungee.util; import com.google.common.collect.ImmutableList; import org.junit.Test; -import static org.junit.Assert.*; - public class BoundedArrayListTest {