Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Javadocs: https://jd.viaversion.com

Maven

ViaVersion provides a Maven repository that you can use to implement the ViaVersion API inside your project.

Repository:
Code Block
languagexml
titleViaVersion Maven repository
<repository>
    <id>viaversion-repo</id>
    <url>https://repo.viaversion.com</url>
</repository>


Dependency:
Code Block
languagexml
titleViaVersion Maven dependency
<dependency>
    <groupId>com.viaversion</groupId>
    <artifactId>viaversion-api</artifactId>
    <version>LATEST</version>
</dependency>

You may need to replace LATEST with the version number of the latest release, eg. 2.2.2.

Get the players protocol version

You can get the protocol version from a player, List with all the Minecraft versions + protocol numbers (http://wiki.vg/Protocol_version_numbers), if a player is not controlled by ViaVersion it will return the servers version (e.g. reloads / player not fully logged in).

...

Warning
titleSide Note

When getting the players protocol, join events may not have the protocol linked with the player in time. It is suggested to delay this check by a few ticks.

Legacy BossBar API

Mojang introduced new bossbars in Minecraft 1.9

...