From a42f64c2a2953403b8eeabd765bbcb1006da7ef4 Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Wed, 21 Feb 2024 22:39:07 +0100 Subject: [PATCH] Add ``minecraft-autoplug`` Template (#241) * 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 --- minecraft-autoplug/README.md | 3 + .../minecraft-autoplug-docker.json | 68 ++++++++++++++++ minecraft-autoplug/minecraft-autoplug.json | 77 +++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 minecraft-autoplug/README.md create mode 100644 minecraft-autoplug/minecraft-autoplug-docker.json create mode 100644 minecraft-autoplug/minecraft-autoplug.json diff --git a/minecraft-autoplug/README.md b/minecraft-autoplug/README.md new file mode 100644 index 00000000..c7b77868 --- /dev/null +++ b/minecraft-autoplug/README.md @@ -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``. diff --git a/minecraft-autoplug/minecraft-autoplug-docker.json b/minecraft-autoplug/minecraft-autoplug-docker.json new file mode 100644 index 00000000..12ec5973 --- /dev/null +++ b/minecraft-autoplug/minecraft-autoplug-docker.json @@ -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 color and formatting codes.", + "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" + } +} diff --git a/minecraft-autoplug/minecraft-autoplug.json b/minecraft-autoplug/minecraft-autoplug.json new file mode 100644 index 00000000..b2652625 --- /dev/null +++ b/minecraft-autoplug/minecraft-autoplug.json @@ -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 color and formatting codes.", + "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" + } +}