Remove unused fields

This commit is contained in:
md_5 2014-02-01 10:36:10 +11:00
parent 35a5230b52
commit 19b4c09a16

View File

@ -33,7 +33,6 @@ import net.md_5.bungee.netty.PipelineUtils;
import net.md_5.bungee.netty.cipher.CipherDecoder; import net.md_5.bungee.netty.cipher.CipherDecoder;
import net.md_5.bungee.netty.cipher.CipherEncoder; import net.md_5.bungee.netty.cipher.CipherEncoder;
import net.md_5.bungee.protocol.DefinedPacket; import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.packet.Login;
import net.md_5.bungee.protocol.packet.Handshake; import net.md_5.bungee.protocol.packet.Handshake;
import net.md_5.bungee.protocol.packet.EncryptionResponse; import net.md_5.bungee.protocol.packet.EncryptionResponse;
import net.md_5.bungee.protocol.packet.EncryptionRequest; import net.md_5.bungee.protocol.packet.EncryptionRequest;
@ -59,14 +58,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Getter @Getter
private final ListenerInfo listener; private final ListenerInfo listener;
@Getter @Getter
private Login forgeLogin;
@Getter
private Handshake handshake; private Handshake handshake;
@Getter @Getter
private LoginRequest loginRequest; private LoginRequest loginRequest;
private EncryptionRequest request; private EncryptionRequest request;
private State thisState = State.HANDSHAKE; private State thisState = State.HANDSHAKE;
private SecretKey sharedKey;
private final Unsafe unsafe = new Unsafe() private final Unsafe unsafe = new Unsafe()
{ {
@Override @Override
@ -79,7 +75,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode(); private boolean onlineMode = BungeeCord.getInstance().config.isOnlineMode();
@Getter @Getter
private InetSocketAddress virtualHost; private InetSocketAddress virtualHost;
private byte version = -1;
@Getter @Getter
private String UUID; private String UUID;
@ -279,7 +274,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{ {
Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" ); Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" );
sharedKey = EncryptionUtil.getSecret( encryptResponse, request ); SecretKey sharedKey = EncryptionUtil.getSecret( encryptResponse, request );
BungeeCipher decrypt = EncryptionUtil.getCipher( false, sharedKey ); BungeeCipher decrypt = EncryptionUtil.getCipher( false, sharedKey );
ch.addBefore( PipelineUtils.FRAME_DECODER, PipelineUtils.DECRYPT_HANDLER, new CipherDecoder( decrypt ) ); ch.addBefore( PipelineUtils.FRAME_DECODER, PipelineUtils.DECRYPT_HANDLER, new CipherDecoder( decrypt ) );
BungeeCipher encrypt = EncryptionUtil.getCipher( true, sharedKey ); BungeeCipher encrypt = EncryptionUtil.getCipher( true, sharedKey );
@ -428,7 +423,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override @Override
public int getVersion() public int getVersion()
{ {
return ( handshake == null ) ? version : handshake.getProtocolVersion(); return ( handshake == null ) ? -1 : handshake.getProtocolVersion();
} }
@Override @Override