Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Update your local Paper MC version
import requests
import re
import json
import os
req = requests.get("https://papermc.io/api/v2/projects/paper/version_group/1.16/builds").text
releases = json.loads(req)
download = 'https://papermc.io/api/v2/projects/paper/versions/'+releases['builds'][-1]['version'] + '/builds/' + str(releases['builds'][-1]['build']) + '/downloads/'+releases['builds'][-1]['downloads']['application']['name']
print("Removing old Paper...")
os.system('rm paper.jar')
print("Removed")
print()
print("Downloading new Paper")
os.system('wget -O paper.jar ' + download)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment