ProtocolLib

3M Downloads

Registering a Listener for SET_PROTOCOL Blocks Players From Logging In

LOOHP opened this issue ยท 1 comments

commented
  • This issue is not solved in a development build

Describe the bug
Simply registering a packet listener for the PacketType.Handshake.Client.SET_PROTOCOL blocks players from logging in (they get stuck when the client shows Encrypting until timeout), this is tested in 1.20.2 & 1.20.6.

ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(PacketAdapter.params().optionAsync().plugin(InteractiveChat.plugin).types(PacketType.Handshake.Client.SET_PROTOCOL)) {
    @Override
    public void onPacketReceiving(PacketEvent event) {
        //This never gets called, even while the player is stuck.
        //So what's in here or whether there's anything here does not matter.
    }
});

It does not matter if optionAsync() is present or not.

To Reproduce

  1. Register the listener as shown in the code above
  2. Install the plugin, boot the server
  3. Try to login

Expected behavior
Being able to login as usual

Version Info
https://pastebin.com/y95HYpkb

commented

Update: This issue is still present in 1.20.6.