mirror of
https://github.com/pelican-eggs/games-standalone.git
synced 2024-11-23 19:02:59 +01:00
Merge pull request #156 from NgLoader/minecraft/forge-enhanced
Added minecraft forge build number support
This commit is contained in:
commit
c1df3395c3
@ -3,8 +3,8 @@
|
|||||||
"meta": {
|
"meta": {
|
||||||
"version": "PTDL_v1"
|
"version": "PTDL_v1"
|
||||||
},
|
},
|
||||||
"exported_at": "2018-08-02T16:56:12-04:00",
|
"exported_at": "2019-02-10T22:57:27+01:00",
|
||||||
"name": "Forge-Enhanced",
|
"name": "Forge Enhanced",
|
||||||
"author": "parker@parkervcp.com",
|
"author": "parker@parkervcp.com",
|
||||||
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
|
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
|
||||||
"image": "quay.io\/pterodactyl\/core:java",
|
"image": "quay.io\/pterodactyl\/core:java",
|
||||||
@ -17,9 +17,9 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/ash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk update\r\napk add curl\r\n\r\nif [ -z \"$MC_VERSION\" ] || [ \"$MC_VERSION\" == \"latest\" ]; then\r\n INSTALLER_JAR=$(curl -sl http:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/ | grep -A50 Recommended | grep installer.jar | grep -Eo \"(http|https):\/\/[a-zA-Z0-9.\/?=_-]*\" | tail -1)\r\n UNIVERSAL_JAR=$(curl -sl http:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/ | grep -A50 Recommended | grep universal.jar | grep -Eo \"(http|https):\/\/[a-zA-Z0-9.\/?=_-]*\" | tail -1)\r\nelse\r\n INSTALLER_JAR=$(curl -sl http:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_$MC_VERSION.html | grep -A50 Recommended | grep installer.jar | grep -Eo \"(http|https):\/\/[a-zA-Z0-9.\/?=_-]*\" | tail -1)\r\n UNIVERSAL_JAR=$(curl -sl http:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_$MC_VERSION.html | grep -A50 Recommended | grep universal.jar | grep -Eo \"(http|https):\/\/[a-zA-Z0-9.\/?=_-]*\" | tail -1)\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"getting installer from $INSTALLER_JAR\"\r\ncurl -Sl $INSTALLER_JAR -o installer.jar\r\n\r\necho -e \"getting universal jar from $UNIVERSAL_JAR\"\r\ncurl -Sl $UNIVERSAL_JAR -o server.jar\r\n\r\njava -jar installer.jar --installServer\r\nrm -rf installer.jar\r\n\r\necho \"Install complete\"",
|
"script": "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Fetching version\r\nif [ -z \"$MC_VERSION\" ] || [ \"$MC_VERSION\" == \"latest\" ]; then\r\n echo \"Fetching latest\"\r\n MC_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1].[0-9]*.[0-9]* - [0-9]*.[0-9]*.[0-9]*.[0-9]*' | sed 's\/ \/\/g')\r\nelif [[ ! \"$MC_VERSION\" =~ - ]]; then\r\n echo \"Fetching latest from version $MC_VERSION\"\r\n MC_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_$MC_VERSION.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1].[0-9]*.[0-9]* - [0-9]*.[0-9]*.[0-9]*.[0-9]*' | sed 's\/ \/\/g')\r\nfi\r\n\r\n#Checking if forge version valid\r\nif [[ ! \"$MC_VERSION\" =~ [1].[0-9]*.[0-9]*-[0-9]*.[0-9]*.[0-9]*.[0-9]* ]]; then\r\n echo \"!!! Invalid forge version \\\"$MC_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Go into main direction\r\ncd \/mnt\/server\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version \\\"$MC_VERSION\\\"\"\r\ncurl -o installer.jar -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-installer.jar\r\ncurl -o $SERVER_JARFILE -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-universal.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ] || [ ! -f .\/$SERVER_JARFILE ]; then\r\n echo \"!!! Error by downloading forge version \\\"$MC_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar",
|
||||||
"container": "openjdk:8-alpine",
|
"container": "openjdk:8",
|
||||||
"entrypoint": "ash"
|
"entrypoint": "bash"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"variables": [
|
"variables": [
|
||||||
@ -33,13 +33,13 @@
|
|||||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
|
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Forge Version",
|
"name": "Forge version",
|
||||||
"description": "The version of minecraft you want to download forge for.\r\n\r\nExample 1.7.10",
|
"description": "The version of forge that you want to run.\r\nExamples:\r\n- 1.12.2\r\n- 1.12.2-14.23.5.2810",
|
||||||
"env_variable": "MC_VERSION",
|
"env_variable": "MC_VERSION",
|
||||||
"default_value": "latest",
|
"default_value": "latest",
|
||||||
"user_viewable": 1,
|
"user_viewable": 1,
|
||||||
"user_editable": 1,
|
"user_editable": 1,
|
||||||
"rules": "required|string|max:20"
|
"rules": "required|string|max:22"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user