parent
ce39b12abc
commit
9bf20e6af3
5 changed files with 27 additions and 4 deletions
@ -0,0 +1,16 @@ |
||||
import requests |
||||
|
||||
version = "1.18.1" |
||||
destPath = "../server/paper.jar" |
||||
|
||||
base = "https://papermc.io/api/v2/projects/paper/versions" |
||||
r = requests.get(f"{base}/{version}") |
||||
|
||||
build = max(r.json()['builds']) |
||||
r = requests.get(f"{base}/{version}/builds/{build}") |
||||
|
||||
download = r.json()['downloads']['application']['name'] |
||||
content = requests.get(f"{base}/{version}/builds/{build}/downloads/{download}").content |
||||
|
||||
with open(destPath, "wb") as file: |
||||
file.write(content) |
@ -1,2 +1,2 @@ |
||||
cd server |
||||
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar spigot.jar nogui |
||||
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar paper.jar nogui |
Loading…
Reference in new issue