This is a simple python script made to manage a minecraft server from the command-line.
- Python 3.10+
- A minecraft server
- A batch file to start the server. More info here
Clone the repository or download main.py
git clone https://github.com/suspiciousRaccoon/python-minecraft-commandline-server-script.git
-
Modify the following constants at the beginning of the script to match your setup:
SERVER_START_BAT = "C:\\path\\to\\your\\start.bat" SERVER_DIRECTORY = "C:\\path\\to\\your\\server\\directory"
-
Open a command prompt and navigate to the directory containing
main.py
. -
Run the script using the following command:
python main.py
-
The script will present you with a menu of options:
[1] Start Server
: Starts the Minecraft server if it's not already running.[2] Execute Command
: Allows you to send commands to the server.[3] Stop Server
: Stops the running Minecraft server.[4] Exit Program
: Stops the server (if running) and exits the script.
This project is licensed under the MIT License.