Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player can not login if listen to CLIENT.FINISH_CONFIGURATION #2698

Closed
tanyaofei opened this issue Dec 23, 2023 · 1 comment · Fixed by #2961
Closed

Player can not login if listen to CLIENT.FINISH_CONFIGURATION #2698

tanyaofei opened this issue Dec 23, 2023 · 1 comment · Fixed by #2961

Comments

@tanyaofei
Copy link

tanyaofei commented Dec 23, 2023

  • [+] This issue is not solved in a development build

Describe the bug
Showing Internal Exception: java.lang.NullPointerException: type cannot be null' while login in if plugin is listening to PacketType.Configuration.Client.FINISH_CONFIGURATION;

And server log:
[02:19:18 INFO]: com.mojang.authlib.GameProfile@6aa2c128[id=xxxxx-58bf81149365,name=xxx,properties={textures=[Property[name=textures, value=xxxx]]}] lost connection: Internal Exception: java.lang.NullPointerException: type cannot be null

ProtocolLib version
5.2.0-SNAPSHOT

Server Version
Purpur 1.20.2

To Reproduce
Steps to reproduce the behavior:

public class PlayerLoginListener extends PacketAdapter {

    public final static PlayerLoginListener instance = new PlayerLoginListener();

    public PlayerLoginListener() {
        super(Main.getInstance(), PacketType.Configuration.Client.FINISH_CONFIGURATION);
    }

    @Override
    public void onPacketReceiving(PacketEvent event) {
        System.out.println(event);
    }

}

The exception caused before the onPacketReceiving was called

image

@tanyaofei
Copy link
Author

tanyaofei commented Dec 24, 2023

image

It seems that the problem is when player send FINISH_CONFIGURATION packet, the protocol changed to PLAY (injector.getCurrentProtocol()), but the packet type definintion is CONFIGURATION, can not create the right PacketContainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant