-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunServer.bat
More file actions
37 lines (31 loc) · 1 KB
/
RunServer.bat
File metadata and controls
37 lines (31 loc) · 1 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
@echo off
REM Minecraft Server Startup Script
REM Forces IPv4 to fix Meshnet/VPN binding issues
REM Set title for window
title Minecraft Server 1.21.11
REM Switch to the script's directory ensures relative paths work
cd /d "%~dp0"
echo ========================================================
echo Starting Minecraft Server...
echo Binding to IPv4 Stack (Meshnet Compatible)
echo ========================================================
echo.
REM Verify Java is installed
java -version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Java is not installed or not in your PATH.
echo Please install Java 21 or newer.
echo.
pause
exit /b
)
REM Launch Server
REM -Xms: Initial Memory
REM -Xmx: Max Memory
REM -Djava.net.preferIPv4Stack=true: CRITICAL for Meshnet
java -Xms1024M -Xmx2048M -Djava.net.preferIPv4Stack=true -jar server.jar nogui
echo.
echo ========================================================
echo Server has stopped.
echo ========================================================
pause