-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_all.bat
More file actions
44 lines (36 loc) · 1.13 KB
/
Copy pathstart_all.bat
File metadata and controls
44 lines (36 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
title ProgettoBOT Full Startup
if not exist "%~dp0server\server.jar" (
echo [ERROR] server\server.jar not found.
echo Create the server folder and place the Minecraft server jar inside it.
pause
exit /b 1
)
if not exist "%~dp0.env" (
echo [ERROR] .env file not found in the project root.
echo Copy .env.example to .env and fill in the required variables.
pause
exit /b 1
)
set "PYTHON_BIN=python"
if exist "%~dp0.venv\Scripts\python.exe" (
set "PYTHON_BIN=%~dp0.venv\Scripts\python.exe"
)
:: 1) Start the Minecraft server
start "MC Server" cmd /k ^
"cd /d \"%~dp0server\" && ^
java -Xmx2G -Xms1G -jar server.jar nogui"
:: 2) Start the chat + follower bot
start "ChatBot" cmd /k ^
"cd /d \"%~dp0kick-chat\" && ^
\"%PYTHON_BIN%\" script.py"
:: 3) Start the RCON controller (chat commands -> Minecraft)
start "RCON Bot" cmd /k ^
"cd /d \"%~dp0kick-chat\" && ^
\"%PYTHON_BIN%\" mc_rcon_control.py"
:: 4) Start the block progress monitor (blocks_count.txt + percent)
start "BlockProgress" cmd /k ^
"cd /d \"%~dp0kick-chat\" && ^
\"%PYTHON_BIN%\" block_progress.py"
echo All processes have been started.
pause