Skip to content

Expose server API version along with helper methods #14015

Description

@Toffikk

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

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions