From ed064e9b2f4660706f36a116c72227027b16238c Mon Sep 17 00:00:00 2001 From: Wei Wang <62213594+weiw11@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:17:52 -0400 Subject: [PATCH 1/2] add necesse template --- necesse/README.md | 15 +++++ necesse/necesse.json | 128 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 necesse/README.md create mode 100644 necesse/necesse.json diff --git a/necesse/README.md b/necesse/README.md new file mode 100644 index 0000000..d40db0c --- /dev/null +++ b/necesse/README.md @@ -0,0 +1,15 @@ +# Necesse Server Template + +This template is for [Necesse](https://necessegame.com/) server creation for PufferPanel. + +## Requirements + +- PufferPanel version steamdl support. +- Necesse comes pre-bundled with Java. + - Installing a different Java version instead of pre-bundled may break future builds. + +## Additional Information + +1. We are removing the `server.cfg` file on every run in order to force the server to use the variables we configured. Otherwise we will need to manually delete the file every time we change the configurations. +2. I am using `Xms512m` for JVM args in order to fix startup error when JVM args is empty. + 1. Based on my experience running the server so far, `Xms512m` should be the bare minimum. diff --git a/necesse/necesse.json b/necesse/necesse.json new file mode 100644 index 0000000..a1a85e9 --- /dev/null +++ b/necesse/necesse.json @@ -0,0 +1,128 @@ +{ + "name": "necesse", + "display": "Necesse", + "type": "srcds", + "install": [ + { + "appId": "1169370", + "type": "steamgamedl" + }, + { + "commands": [ + "chmod +x jre/bin/java", + "rm ./cfg/server.cfg" + ], + "type": "command" + } + ], + "run": { + "stop": "/stop", + "command": "./jre/bin/java ${jvmargs} -jar Server.jar -nogui -localdir -port ${port} -world ${world} -slots ${slots} -owner \"${owner}\" -motd \"${motd}\" -password \"${password}\" -pausewhenempty ${pausewhenempty} -giveclientspower ${giveclientspower} -logging ${logging} -zipsaves ${zipsaves}", + "workingDirectory": "", + "pre": [ + { + "commands": [ + "rm ./cfg/server.cfg" + ], + "type": "command" + }, + { + "commands": [ + "rm ./cfg/server.cfg" + ], + "type": "command" + } + ], + "post": [], + "environmentVars": {} + }, + "data": { + "giveclientspower": { + "type": "string", + "desc": "If the server should check client actions, a kind of anti-cheat. When this setting is on it will give a much smoother experience for clients. (0 off, 1 on)", + "display": "Give Clients Power", + "value": "1", + "userEdit": true + }, + "jvmargs": { + "type": "string", + "desc": "Any extra arguments to supply to the JVM", + "display": "JVM Args", + "value": "-Xms512m", + "userEdit": true + }, + "logging": { + "type": "integer", + "desc": "Generate a log file for each session. (0 off, 1 on)", + "display": "Logging", + "value": "0", + "userEdit": true + }, + "motd": { + "type": "string", + "desc": "Message to player when when connected to server", + "display": "MOTD", + "value": "Welcome to Necesse!", + "userEdit": true + }, + "owner": { + "type": "string", + "desc": "Player's name to set owner permission. All players with this name will have owner permission!", + "display": "Owner", + "value": "", + "userEdit": true + }, + "password": { + "type": "string", + "desc": "Password players must enter in order to connect to the server. Players can save this password directly in game, so this can be more complex.", + "display": "Server Password", + "value": "", + "userEdit": true + }, + "pausewhenempty": { + "type": "integer", + "desc": "Pauses the world when there are no players in server. (0 off, 1 on)", + "display": "Pause When Empty", + "value": "1", + "userEdit": true + }, + "port": { + "type": "integer", + "desc": "Port to host at", + "display": "Port", + "value": "14159", + "userEdit": true + }, + "slots": { + "type": "integer", + "display": "Player Slots", + "required": true, + "value": "10", + "userEdit": true + }, + "world": { + "type": "string", + "desc": "World name", + "display": "World", + "required": true, + "value": "world", + "userEdit": true + }, + "zipsaves": { + "type": "integer", + "desc": "Whether saves should be compressed. (0 off, 1 on)", + "display": "Zip Saves", + "value": "1", + "userEdit": true + } + }, + "environment": { + "type": "standard" + }, + "supportedEnvironments": [ + { + "type": "standard" + } + ], + "requirements": {} +} \ No newline at end of file From 08f952babb17a4d5b8abb80ddfadbb975b7edc5d Mon Sep 17 00:00:00 2001 From: Wei Wang <62213594+weiw11@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:26:35 -0400 Subject: [PATCH 2/2] fix necesse duplicate server.cfg remove cmd --- necesse/necesse.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/necesse/necesse.json b/necesse/necesse.json index a1a85e9..6731e9b 100644 --- a/necesse/necesse.json +++ b/necesse/necesse.json @@ -20,12 +20,6 @@ "command": "./jre/bin/java ${jvmargs} -jar Server.jar -nogui -localdir -port ${port} -world ${world} -slots ${slots} -owner \"${owner}\" -motd \"${motd}\" -password \"${password}\" -pausewhenempty ${pausewhenempty} -giveclientspower ${giveclientspower} -logging ${logging} -zipsaves ${zipsaves}", "workingDirectory": "", "pre": [ - { - "commands": [ - "rm ./cfg/server.cfg" - ], - "type": "command" - }, { "commands": [ "rm ./cfg/server.cfg"