Page tree

Versions Compared


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



The old API is deprecated from 1.0.0, please use the new API.


What changed?

We focused for the 1.0.0 release at making ViaVersion multiplatform compatible. This also meant we had to change the way ViaVersion and the api worked,


The class ViaVersion is deprecated, by usages like ViaVersion.getInstance() use Via.getAPI() inteadinstead.


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


Code Block
titleViaVersion Maven repository


Code Block
titleViaVersion Maven dependency


ViaVersion provides an API for developers to use the new BossBar for 1.9 players and higher.


Example BossBar usage:

Code Block
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import us.myles.ViaVersion.api.ViaVersion;
import us.myles.ViaVersion.api.ViaVersionAPI;
import us.myles.ViaVersion.api.boss.BossBar;
import us.myles.ViaVersion.api.boss.BossColor;
import us.myles.ViaVersion.api.boss.BossStyle;

public class BossBarExample extends JavaPlugin implements Listener {
    private BossBar bossBar;

    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this); // Register Bukkit events

        ViaAPI api = Via.getAPI(); // Get the API
        bossBar = api.createBossBar(
                "Hi! This BossBar is created using the ViaVersion API!", // BossBar title
                1F, // Boss health (Float between 0 and 1)
                BossColor.BLUE,  // BossBar color
                BossStyle.SOLID); // BossBar Style

    public void onJoin(PlayerJoinEvent e) {
		// When we added the BossBar, we supported addPlayer with a Player object, that is deprecated since 1.0.0. 
		// Get the player UUID instead.
        bossBar.addPlayer(e.getPlayer().getUniqueId()); // Show the BossBar when a player joins 


titleSide note

Our API will not give 1.8 players a BossBar for the people that use 1.8-1.8.8.

Spigot provides an API for everyone that uses Spigot 1.9 and higher. We recommend you to use that one if you are using Spigot 1.9 or higher.