
Let your players start any backend server without your intervention!
Native Velocity plugin version: 3.3.0-SNAPSHOT
A Minecraft Velocity plugin to manage multiple backend servers through a list of simple commands. Define startup scripts for the servers on your network to allow players in game to start them up (from a fully shut down state) without your intervention!
This plugin was made to allow players on a Velocity server network to start backend Minecraft servers without the need for manual intervention by a server admin, even if the backend server is completely shut down. This is done by defining a batch script or any other preferred program that will run the servers run.bat file. When an in-game player uses the startup or join commands, the server will be started up without the need for any admin to manually boot the server.
The config should be self explanatory however if you do not know how to setup a script file, here is an example. Paste it in a file within the scripts folder of the plugin and name the file according to the script-pattern setting in the config.yml so the plugin can locate it.
Example server startup script@echo off
setlocal enabledelayedexpansion
:: ---
:: Settings
:: ---
:: Unique server name (used to check if the server isn't already running)
set serverName=my_server_name
:: The batch file containing the startup script of the minecraft server
set batchDir=..\..\..\..\servers\my_server_folder
set batchFile=run.bat
:: !!!
:: Do not change anything below this line, unless you know what you are doing of course :)
:: !!!
set "windowName=[server-control] %serverName%"
set outFile=temp_%serverName%.tmp
:: ---
:: Check if server isn't already running
:: ---
powershell -Command "(Get-Process -Name cmd, powershell | Where-Object {$_.MainWindowTitle -eq '%windowName%'}).Count" | findstr /C:"0" >nul
if errorlevel 1 (
echo Server process window is already running, has it crashed?
exit /b 10
)
:: ---
:: Start the batchFile in batchDir
:: ---
set "originalDir=%cd%"
pushd "%batchDir%"
start /min "%windowName%" cmd /c "%batchFile%
popd
exit /b 0
Please use the github repo for this plugin for any support, feature requests, etc. as I will likely not read this Modrinth page much.
Only use scripts that you yourself have created or that you have received from trusted sources. Scripting languages such as batch can be used to do harm to your system.