Get Paper Version

Hey,

how can i get the current Paper Version of my Server.
And how can i check, how many versions its behind the newest?

Like the version Command.

You can get the version string like Bukkit#getVersion(), see the javadocs.
All builds for a version are available at https://papermc.io/api/v2/projects/paper/versions/<version>, so if you’re looking to get all builds for 1.17.1, you can make a call to https://papermc.io/api/v2/projects/paper/versions/1.17.1 and compare it with your current build number.

Thanks for your answer.

I’ve been using a script to keep my server up to date. Once a day it would check and download the latest version. This is broken now.
Used to use the powershell command…
-command "Invoke-WebRequest -Uri https://papermc.io/api/v1/paper/1.17.1/latest/download -outfile PaperMC1.17.1_1.jar

According to a post on the discord:

Version 1 of our downloads API has now been shutdown.

Documentation for version 2 can be found at https://papermc.io/api/docs/.

This change does not affect plugin developers, or the Paper API itself - only those who are downloading via our web API.