Expose server API version along with helper methods
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem?
Currently when trying to gate logic behind MC versions in plugins you need to implement some sort of a version matcher for MC versions or use protocol versions.
Describe the solution you'd like.
I would like to see the server’s latest supported API version exposed in the API along with an isCompatible() method to make version dependent plugin code cleaner.
A possible implementation could look similar to to ServerBuildInfo with the latest plugin API version supported by the server being exposed along with something like ApiVersionInfo#isCompatible(String version)
Describe alternatives you've considered.
mentioned above
Other
Tbh just the isCompatible method would be enough for most use cases
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ServerBuildInfo and the existing plugin API versioning code. Compare the proposed ApiVersionInfo shape and decide whether exposing the latest supported API version, an isCompatible(String version) method, or both meets the plugin use case. Done means the API design is settled and covered by tests for compatible and incompatible versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100