Skip to content

ProtocolLib reports incorrect PacketType under CatServer (Bukkit-Forge hybrid server) #858

@NewbieOrange

Description

@NewbieOrange

Describe the bug
This is a follow-up issue of #825.

While ProtocolLib does load and receive & send packets under CatServer, the received packet sometimes gives incorrect PacketType. This behaviour breaks plugins using PacketType to determine which packet is received.

To Reproduce
The reproduce example is using plugin FastLogin. Any other plugin should have the similar results.

Note that probably only a portion, not all of the PacketTypes are incorrectly identified.

Steps to reproduce the behavior:

  1. Login to a server with FastLogin installed.
  2. Stack trace printed to the console.

Expected behavior
Correct PacketType value is expected. In this case, the Login.Client.LoginInStart packet is recognized as another type, causing FastLogin to access non-existent fields.

I have not analyzed which type ProtocolLib gives, but adding two temporary packet listener using /packet command to Login.Client.Start and Login.Client.EncryptionBegin gives no message when a player logs in.

Screenshots
Exception stack traces: https://pastebin.com/sYJGCyup

Version Info
https://pastebin.com/Jf6Sq9RY

Additional context
A workaround fix for FastLogin TuxCoding/FastLogin#360 fixed the issue under CatServer, confirming ProtocolLib does report wrong PacketType.

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