#2527: Minor cosmetic cleanups to imports etc

Please see https://github.com/SpigotMC/BungeeCord/pull/2527
This commit is contained in:
NayXegp 2018-09-23 03:11:26 +02:00 committed by md_5
parent ed6b03d24a
commit 6c44ccd597
12 changed files with 10 additions and 22 deletions

View File

@ -5,7 +5,6 @@ import java.util.List;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import net.md_5.bungee.Util;

View File

@ -6,7 +6,6 @@ import lombok.ToString;
import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.plugin.Event;
/**
* Called when the proxy is pinged with packet 0xFE from the server list.

View File

@ -3,7 +3,6 @@ package net.md_5.bungee.api.chat;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import net.md_5.bungee.api.chat.ClickEvent.Action;
@Getter
@ToString

View File

@ -2,7 +2,6 @@ package net.md_5.bungee.api.chat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import net.md_5.bungee.api.ChatColor;

View File

@ -1,7 +1,6 @@
package net.md_5.bungee;
import com.google.common.base.Charsets;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;

View File

@ -1,6 +1,5 @@
package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
@ -12,6 +11,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Objects;
import java.util.Queue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@ -79,7 +79,7 @@ public class BungeeServerInfo implements ServerInfo
@Override
public boolean equals(Object obj)
{
return ( obj instanceof ServerInfo ) && Objects.equal( getAddress(), ( (ServerInfo) obj ).getAddress() );
return ( obj instanceof ServerInfo ) && Objects.equals( getAddress(), ( (ServerInfo) obj ).getAddress() );
}
@Override

View File

@ -2,7 +2,6 @@ package net.md_5.bungee;
import com.google.common.base.Preconditions;
import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

View File

@ -7,7 +7,6 @@ import java.util.Locale;
import java.util.Queue;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Level;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.api.ChatColor;

View File

@ -1,6 +1,5 @@
package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import io.netty.bootstrap.Bootstrap;
@ -17,6 +16,7 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.UUID;
import java.util.logging.Level;
@ -51,13 +51,11 @@ import net.md_5.bungee.protocol.MinecraftDecoder;
import net.md_5.bungee.protocol.MinecraftEncoder;
import net.md_5.bungee.protocol.PacketWrapper;
import net.md_5.bungee.protocol.Protocol;
import net.md_5.bungee.protocol.ProtocolConstants;
import net.md_5.bungee.protocol.packet.Chat;
import net.md_5.bungee.protocol.packet.ClientSettings;
import net.md_5.bungee.protocol.packet.Kick;
import net.md_5.bungee.protocol.packet.PlayerListHeaderFooter;
import net.md_5.bungee.protocol.packet.PluginMessage;
import net.md_5.bungee.protocol.packet.Respawn;
import net.md_5.bungee.protocol.packet.SetCompression;
import net.md_5.bungee.tab.ServerUnique;
import net.md_5.bungee.tab.TabList;
@ -235,7 +233,7 @@ public final class UserConnection implements ProxiedPlayer
while ( !serverJoinQueue.isEmpty() )
{
ServerInfo candidate = ProxyServer.getInstance().getServerInfo( serverJoinQueue.remove() );
if ( !Objects.equal( currentTarget, candidate ) )
if ( !Objects.equals( currentTarget, candidate ) )
{
next = candidate;
break;
@ -294,7 +292,7 @@ public final class UserConnection implements ProxiedPlayer
final BungeeServerInfo target = (BungeeServerInfo) event.getTarget(); // Update in case the event changed target
if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
if ( getServer() != null && Objects.equals( getServer().getInfo(), target ) )
{
if ( callback != null )
{

View File

@ -4,7 +4,6 @@ import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import com.google.gson.Gson;
import java.math.BigInteger;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URLEncoder;
import java.security.MessageDigest;
@ -29,7 +28,6 @@ import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.Connection.Unsafe;
import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.LoginEvent;
@ -487,7 +485,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
offlineId = java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + getName() ).getBytes( Charsets.UTF_8 ) );
offlineId = UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + getName() ).getBytes( Charsets.UTF_8 ) );
if ( uniqueId == null )
{
uniqueId = offlineId;

View File

@ -2,9 +2,9 @@ package net.md_5.bungee.forge;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
@ -36,7 +36,7 @@ public class ForgeUtils
*/
public static Map<String, String> readModList(PluginMessage pluginMessage)
{
Map<String, String> modTags = Maps.newHashMap();
Map<String, String> modTags = new HashMap<>();
ByteBuf payload = Unpooled.wrappedBuffer( pluginMessage.getData() );
byte discriminator = payload.readByte();
if ( discriminator == 2 ) // ModList

View File

@ -79,9 +79,8 @@ public final class ChatComponentTransformer
* Transform a ScoreComponent by replacing the name and value with the
* appropriate values.
*
* @param component the component to transform
* @param scoreboard the scoreboard to retrieve scores from
* @param player the player to use for the component's name
* @param component the component to transform
*/
private void transformScoreComponent(ProxiedPlayer player, ScoreComponent component)
{