Open TIBTHINK opened 2 years ago
i was able to make a python script that does just that, using GitHub's API to find and update new releases
pwd = os.getcwd()
class plugins():
def github_downloader(url, name, sub=1):
dynmap_response = requests.get(url)
data = dynmap_response.json()
spigot_number = len(data[1]['assets'])
download_link = print(data[1]['assets'][spigot_number - sub]['browser_download_url'])
open(pwd + "/plugins/" + name, 'wb').write(requests.get(download_link).content)
plugins.github_downloader("https://api.github.com/repos/webbukkit/dynmap/releases", "Dynmap.jar")
plugins.github_downloader("https://api.github.com/repos/PryPurity/WorldBorder/releases", "WorldBorder.jar")
plugins.github_downloader("https://api.github.com/repos/EssentialsX/Essentials/releases", "EssentialsX.jar", 8 )
But doesn't that require to also have maven, JDK etc installed?
for an auto-updater to work you have two options on how to approach this