ProtocolLib

3M Downloads

ProtocolManager.getProtocolVersion is returning the port number on Java 17

Jaren8r opened this issue ยท 2 comments

commented

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new server with Paper 1.17.1 on Java 17
  2. Add ProtocolLib, as well as any plugin that uses ProtocolLib to get your client version
  3. Observe the client version

Expected behavior
getProtocolVersion should be returning 756, rather than 25565 (the port I am connecting to the server with)

Version Info
https://pastebin.com/L4sgW13F

Additional context
This code works as expected on Java 16

commented

Interesting. Probably got broken when all the mappings changed. I can take a look.

Realistically though the protocol version should be static on a standard (i.e. non-ViaVersion) server, so you should be fine to assume it's 756

commented

Fixed by #1473