mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Update for PacketLib changes.
This commit is contained in:
parent
861a234a09
commit
6d29ff07f8
1 changed files with 11 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue