Skip to content

Registering a Listener for SET_PROTOCOL Blocks Players From Logging In #2647

@LOOHP

Description

@LOOHP
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions