...
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 | ||||
---|---|---|---|---|
| ||||
<repository> <id>viaversion-repo</id> <url>https://repo.viaversion.com</url> </repository> |
Dependency:
Code Block | ||||
---|---|---|---|---|
| ||||
<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 | ||
---|---|---|
| ||
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
...