Skip to content

Commit

Permalink
set ip port and modt by ui configuration
Browse files Browse the repository at this point in the history
with the install, the ip port and modt is now written to velocity.yml if it's not already present
a pre-run hook updating the velocity.yml file if it's already existing

Resolves: pufferpanel#258
  • Loading branch information
kuesta authored Mar 18, 2024
1 parent b18850c commit 76c251d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions minecraft-velocity/minecraft-velocity.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
"type": "move",
"source": "velocity-*.jar",
"target": "velocity.jar"
},
{
"if": "!file_exists(\"velocity.toml\")",
"type": "writefile",
"target": "velocity.toml",
"text": "bind = \"${ip}:${port}\"\nmotd = \"${motd}\""
}
],
"run": {
Expand All @@ -81,6 +87,24 @@
}
],
"stop": "shutdown",
"pre": [
{
"if": "file_exists(\"velocity.toml\")",
"type": "alterfile",
"replace": "bind = \"${ip}:${port}\"",
"file": "velocity.toml",
"regex": true,
"search": "(bind = .*:\\w*\")"
},
{
"if": "file_exists(\"velocity.toml\")",
"type": "alterfile",
"regex": true,
"search": "(motd = \".*\")",
"replace": "motd = \"${motd}\"",
"file": "velocity.toml"
}
],
"stdin": {
"type": "stdin"
},
Expand Down

0 comments on commit 76c251d

Please sign in to comment.