SpongePowered / SpongeAPI

A Minecraft plugin API
http://www.spongepowered.org/
MIT License
1.14k stars 342 forks source link

Expose protocol version for status pings #2456

Closed stephan-gh closed 1 year ago

stephan-gh commented 1 year ago

Historically we considered the Minecraft protocol versions as "implementation detail" that should not be exposed in SpongeAPI.

However, since the addition of the status ping API 8 years ago (#367) the protocol version still exists exactly the same way, and there are use cases for checking it (identifying the exact client version) and modifying it (making the server appear as incompatible to clients).

Right now plugins have to resort to using implementation-specific code for this, which is complicated and now hopelessly broken for api-10 (due to internal changes in the Minecraft code).

Make it possible to check and modify the server version to fix this once and for all.

Closes #2251