-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
egg-paper-on-demand.json
109 lines (109 loc) · 7.91 KB
/
egg-paper-on-demand.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2022-01-06T19:32:51+01:00",
"name": "PaperOnDemand",
"author": "[email protected]",
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
"features": [
"eula"
],
"images": [
"ghcr.io\/pterodactyl\/yolks:java_17",
"ghcr.io\/pterodactyl\/yolks:java_16",
"ghcr.io\/pterodactyl\/yolks:java_11",
"ghcr.io\/pterodactyl\/yolks:java_8"
],
"file_denylist": [],
"startup": ".\/msh_server.bin",
"config": {
"files": "{\r\n \"config.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"Port\": \"{{server.build.default.port}}\",\r\n \"StartServer\": \"java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true -jar serverFileName\",\r\n \"FileName\": \"{{SERVER_JARFILE}}\"\r\n }\r\n },\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"25565\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"listening for new clients to connect on\"\r\n}",
"logs": "{}",
"stop": "^c"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n# Paper Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nPROJECT=paper\r\n\r\napt update\r\napt install -y curl jq\r\n\r\nif [ -n \"${DL_PATH}\" ]; then\r\n\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\tDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's\/{{\/${\/g' -e 's\/}}\/}\/g')`\r\nelse\r\n\tVER_EXISTS=`curl -s https:\/\/papermc.io\/api\/v2\/projects\/${PROJECT} | jq -r --arg VERSION $MINECRAFT_VERSION '.versions[] | contains($VERSION)' | grep true`\r\n\tLATEST_VERSION=`curl -s https:\/\/papermc.io\/api\/v2\/projects\/${PROJECT} | jq -r '.versions' | jq -r '.[-1]'`\r\n\r\n\tif [ \"${VER_EXISTS}\" == \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} version\"\r\n\t\tMINECRAFT_VERSION=${LATEST_VERSION}\r\n\tfi\r\n\t\r\n\tBUILD_EXISTS=`curl -s https:\/\/papermc.io\/api\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r --arg BUILD ${BUILD_NUMBER} '.builds[] | tostring | contains($BUILD)' | grep true`\r\n\tLATEST_BUILD=`curl -s https:\/\/papermc.io\/api\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r '.builds' | jq -r '.[-1]'`\r\n\t\r\n\tif [ \"${BUILD_EXISTS}\" == \"true\" ]; then\r\n\t\techo -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\n\t\tBUILD_NUMBER=${LATEST_BUILD}\r\n\tfi\r\n\t\r\n\tJAR_NAME=${PROJECT}-${MINECRAFT_VERSION}-${BUILD_NUMBER}.jar\r\n\t\r\n\techo \"Version being downloaded\"\r\n\techo -e \"MC Version: ${MINECRAFT_VERSION}\"\r\n\techo -e \"Build: ${BUILD_NUMBER}\"\r\n\techo -e \"JAR Name of Build: ${JAR_NAME}\"\r\n\techo -e \"JAR Name of Server: ${SERVER_JARFILE}\"\r\n\techo -e \"Project Name of Server: ${PROJECT}\"\r\n\techo -e \"Mem of Server: ${SERVER_MEMORY}\"\r\n\techo -e \"Port of Server: ${SERVER_PORT}\"\r\n\tDOWNLOAD_URL=https:\/\/papermc.io\/api\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION}\/builds\/${BUILD_NUMBER}\/downloads\/${JAR_NAME}\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"Running curl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\necho -e \"Running curl -o config.json -X GET https:\/\/api.ebg.pw\/api\/v1\/MSH-ConfigGenerator\/2-4-1?FileName=${SERVER_JARFILE}&ServerType=${VENDOR}&Version=${MINECRAFT_VERSION}&RAM=${SERVER_MEMORY}&Port=${SERVER_PORT}&StopTime=${TBSES}&StopServerAllowKill=${KILL_TIME}\"\r\necho -e \"Running curl -o msh_server.bin ${MSH_D_URL}\"\r\n\r\nif [ -f ${SERVER_JARFILE} ]; then\r\n\tmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\n\r\ncurl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\ncurl -o msh_server.bin ${MSH_D_URL}\r\ncurl -o config.json -X GET \"https:\/\/api.ebg.pw\/api\/v1\/MSH-ConfigGenerator\/2-4-1?FileName=${SERVER_JARFILE}&ServerType=${VENDOR}&Version=${MINECRAFT_VERSION}&RAM=${SERVER_MEMORY}&Port=${SERVER_PORT}&StopTime=${TBSES}&StopServerAllowKill=${KILL_TIME}\"\r\n\r\nchmod u+x .\/msh_server.bin\r\n\r\nif [ ! -f server.properties ]; then\r\n echo -e \"Downloading MC server.properties\"\r\n curl -o server.properties https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/minecraft\/java\/server.properties\r\nfi",
"container": "debian:buster-slim",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Minecraft Version (Releases only)",
"description": "The version of minecraft to download. \r\n\r\nLeave at latest to always get the latest version. Invalid versions will default to latest.\r\nThis does not support snapschots, to use a snapshot please download the .jar, rename it server.jar and look up the Minecraft Protocol version and edit config.json.",
"env_variable": "MINECRAFT_VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:20"
},
{
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
},
{
"name": "Download Path",
"description": "A URL to use to download a server.jar rather than the ones in the install script. This is not user viewable.",
"env_variable": "DL_PATH",
"default_value": "",
"user_viewable": false,
"user_editable": false,
"rules": "nullable|string"
},
{
"name": "Build Number",
"description": "The build number for the paper release.\r\n\r\nLeave at latest to always get the latest version. Invalid versions will default to latest.",
"env_variable": "BUILD_NUMBER",
"default_value": "latest",
"user_viewable": true,
"user_editable": false,
"rules": "required|string|max:20"
},
{
"name": "Vendor",
"description": "Here you can write any Text that will be displayed as Server Jar in Minecraft",
"env_variable": "VENDOR",
"default_value": "Paper",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20"
},
{
"name": "MSH-Download URL",
"description": "Webserver that serves the binary file of MSH",
"env_variable": "MSH_D_URL",
"default_value": "https:\/\/bolverblitz.de\/files\/msh_server.bin",
"user_viewable": false,
"user_editable": false,
"rules": "nullable|string"
},
{
"name": "Wait time for shutdown",
"description": "This is the time in seconds the server should stay online without players",
"env_variable": "TBSES",
"default_value": "120",
"user_viewable": true,
"user_editable": false,
"rules": "required|string"
},
{
"name": "TimeToKill",
"description": "This is the time, MSH will kill the server after sending a stop event and \/save-all",
"env_variable": "KILL_TIME",
"default_value": "30",
"user_viewable": true,
"user_editable": false,
"rules": "required|string"
}
]
}