Update for PacketLib changes.

This commit is contained in:
Steven Smith 2014-06-20 14:21:53 -07:00
parent 861a234a09
commit 6d29ff07f8

View file

@ -34,6 +34,8 @@ import org.spacehq.packetlib.Server;
import org.spacehq.packetlib.Session;
import org.spacehq.packetlib.crypt.AESEncryption;
import org.spacehq.packetlib.crypt.PacketEncryption;
import org.spacehq.packetlib.packet.DefaultPacketHeader;
import org.spacehq.packetlib.packet.PacketHeader;
import org.spacehq.packetlib.packet.PacketProtocol;
import java.security.GeneralSecurityException;
@ -43,11 +45,12 @@ import java.util.UUID;
public class MinecraftProtocol extends PacketProtocol {
private ProtocolMode mode = ProtocolMode.HANDSHAKE;
private AESEncryption encrypt = null;
private PacketHeader header = new DefaultPacketHeader();
private AESEncryption encrypt;
private GameProfile profile = null;
private GameProfile profile;
private String accessToken = "";
private ClientListener clientListener = null;
private ClientListener clientListener;
@SuppressWarnings("unused")
private MinecraftProtocol() {
@ -94,6 +97,11 @@ public class MinecraftProtocol extends PacketProtocol {
return this.encrypt;
}
@Override
public PacketHeader getPacketHeader() {
return this.header;
}
@Override
public void newClientSession(Client client, Session session) {
if(this.profile != null) {