Skip to content

Commit

Permalink
Add minecraft-autoplug Template (#241)
Browse files Browse the repository at this point in the history
* Create minecraft-autoplug.json

* Update minecraft-autoplug.json

* Update minecraft-purpur.json

* Update minecraft-purpur.json

* Create minecraft-autoplug-docker.json

* Create README.md

* Restore minecraft-purpur.json

* Update minecraft-autoplug.json
  • Loading branch information
Minionguyjpro authored Feb 21, 2024
1 parent 82b65fa commit a42f64c
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minecraft-autoplug/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AutoPlug-Client - Minecraft Java
* In the ``general.yml`` at the``autoplug`` directory, set ``start-command`` to something like ``/var/lib/pufferpanel/binaries/java17 -Xmx4096M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -Dlog4j2.formatMsgNoLookups=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui`` to use Aikar's flags for the new Minecraft server JAR instance that AutoPlug will execute. Make sure to point to this Java executable or use any other one from another place!
* To configure AutoPlug's automatic server software updater, edit the ``updater.yml`` file in the ``autoplug`` directory. Under ``server-updater``, set the version to the version of Minecraft you want such as ``latest`` or ``1.19.1``. At ``software``, you can configure the server software to use such as ``paper``, ``purpur`` or ``spigot``.
68 changes: 68 additions & 0 deletions minecraft-autoplug/minecraft-autoplug-docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"type": "minecraft-java",
"display": "AutoPlug - Minecraft (Docker)",
"data": {
"memory": {
"value": "256",
"required": true,
"desc": "How much memory in MB to allocate to the Java Heap for the AutoPlug client, set memory in arguments of AutoPlug to allocate the correct amount of memory to the final Minecraft instance",
"display": "Memory (MB)",
"internal": false,
"type": "integer"
},
"ip": {
"value": "0.0.0.0",
"required": true,
"desc": "What IP to bind the server to",
"display": "IP",
"internal": false
},
"port": {
"value": "25565",
"required": true,
"desc": "What port to bind the server to",
"display": "Port",
"internal": false,
"type": "integer"
},
"eula": {
"value": "false",
"required": true,
"desc": "Do you agree to the Minecraft EULA?",
"display": "EULA Agreement (true/false)",
"internal": false,
"type": "boolean"
},
"motd": {
"value": "A Minecraft Server\\n\\u00A79 hosted on PufferPanel",
"required": true,
"desc": "This is the message that is displayed in the server list of the client, below the name. The MOTD does support <a href='https://minecraft.wiki/w/Formatting_codes' target='_blank'>color and formatting codes</a>.",
"display": "MOTD message of the day",
"internal": false
}
},
"install": [
{
"type": "download",
"files": "https://github.com/Osiris-Team/AutoPlug-Releases/blob/master/stable-builds/AutoPlug-Client.jar"
},
{
"type": "writefile",
"text": "server-ip=${ip}\nserver-port=${port}\nmotd=${motd}\n",
"target": "server.properties"
},
{
"type": "writefile",
"text": "eula=${eula}",
"target": "eula.txt"
}
],
"run": {
"command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -Dlog4j2.formatMsgNoLookups=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar AutoPlug-Client.jar nogui",
"stop": "stop"
},
"environment": {
"type": "docker",
"image": "eclipse-temurin:17"
}
}
77 changes: 77 additions & 0 deletions minecraft-autoplug/minecraft-autoplug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "minecraft-autoplug",
"display": "AutoPlug - Minecraft",
"type": "minecraft-java",
"data": {
"memory": {
"type": "integer",
"desc": "How much memory in MB to allocate to the Java Heap for the AutoPlug client, set memory in arguments of AutoPlug to allocate the correct amount of memory to the final Minecraft instance",
"display": "Memory (MB)",
"required": true,
"value": "256"
},
"ip": {
"type": "string",
"desc": "What IP to bind the server to",
"display": "IP",
"required": true,
"value": "0.0.0.0"
},
"port": {
"type": "integer",
"desc": "What port to bind the server to",
"display": "Port",
"required": true,
"value": "25565"
},
"eula": {
"type": "boolean",
"desc": "Do you agree to the Minecraft EULA?",
"display": "EULA Agreement (true/false)",
"required": true,
"value": "false"
},
"motd": {
"type": "string",
"desc": "This is the message that is displayed in the server list of the client, below the name. The MOTD does support <a href='https://minecraft.wiki/w/Formatting_codes' target='_blank'>color and formatting codes</a>.",
"display": "MOTD message of the day",
"required": true,
"value": "A Minecraft Server\\n\\u00A79 hosted on PufferPanel"
},
"javaversion": {
"type": "integer",
"desc": "Version of Java to use",
"display": "Java Version",
"required": true,
"value": "17"
},
"install": [
{
"type": "javadl",
"version": "${javaversion}"
},
{
"files": [
"https://github.com/Osiris-Team/AutoPlug-Releases/blob/master/stable-builds/AutoPlug-Client.jar"
],
"type": "download"
},
{
"type" : "writefile",
"text": "server-ip=${ip}\nserver-port=${port}\nmotd=${motd}\n",
"target": "server.properties"
},
{
"type": "writefile",
"text": "eula=${eula}",
"target": "eula.txt"
}
],
"run": {
"command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -Dlog4j2.formatMsgNoLookups=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar AutoPlug-Client.jar nogui",
"stop": "stop"
},
"environment": {
"type": "standard"
}
}

0 comments on commit a42f64c

Please sign in to comment.