More actions
mNo edit summary |
mNo edit summary |
||
Line 47: | Line 47: | ||
<li>Download the Recommended Version of Forge 1.18.2 | <li>Download the Recommended Version of Forge 1.18.2 | ||
<ul> | <ul> | ||
<li><pre>wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-[VERSION]/forge-1.18.2-[VERSION]-installer.jar</pre>< | <li><pre>wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-[VERSION]/forge-1.18.2-[VERSION]-installer.jar</pre></li> | ||
{{Ambox | {{Ambox | ||
| type=content | | type=content | ||
| text=Replace <code>[VERSION]</code> in the jar filename with the actual Forge version number from your downloaded file. | | text=Replace <code>[VERSION]</code> in the jar filename with the actual Forge version number from your downloaded file. | ||
}} | }} | ||
</ul> | </ul> | ||
</li> | </li> | ||
<li>Download Server Files | <li>Download Server Files | ||
<ul> | <ul> |
Revision as of 01:28, 22 July 2025
- Install Java 17
-
Ubuntu/Debian sudo apt update sudo apt install openjdk-17-jdk java --version
-
CentOS/RHEL/Fedora/Rocky sudo dnf install java-17-openjdk-devel java --version
-
MacOS (using Homebrew) brew install openjdk@17 java --version
-
CentOS/RHEL/Fedora/Rocky sudo dnf install java-17-openjdk-devel java --version
-
FreeBSD/OpenBSD (via pkg) pkg install openjdk17 java --version
- If you followed the commands above, you should see an output similar the following, after running
java --version
openjdk version "17.0.12" 2024-07-16 LTS OpenJDK Runtime Environment Microsoft-9889599 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Microsoft-9889599 (build 17.0.12+7-LTS, mixed mode, sharing)
-
- Create Server Directory
mkdir ~/VaultHunters-Server cd ~/VaultHunters-Server
- Download the Recommended Version of Forge 1.18.2
- Download Server Files
- Navigate to the Vault Hunters CurseForge page
- Go to the "Files" tab
- Find the latest version
- Click on the version to view details
- In the "Additional Files" section, download the Server Files Pack
- Extract the server files to your server directory
- Create Start Script
- Create a file named
start.sh
in your server directory: -
local unwanted_mods=("legendarytooltips" "torohealth" "rubidium") for mod_pattern in "${unwanted_mods[@]}"; do if ls mods/*$mod_pattern* >/dev/null 2>&1; then rm -f mods/*$mod_pattern* fi done local restart_count=0 while true; do # Build JVM arguments local args=() # Add custom JVM args if specified if [ -n "$JVM_ARGS" ]; then read -ra jvm_args_array <<< "$JVM_ARGS" args+=("${jvm_args_array[@]}") fi # Add user JVM args if file exists if [ -f "user_jvm_args.txt" ]; then while IFS= read -r line; do if [[ "$line" =~ ^-.*$ ]]; then args+=("$line") fi done < "user_jvm_args.txt" fi # Use unix_args.txt instead of win_args.txt on Unix systems local args_file="libraries/net/minecraftforge/forge/1.18.2-$FORGE_VERSION/unix_args.txt" if [ ! -f "$args_file" ]; then # Fallback to win_args.txt if unix_args.txt doesn't exist args_file="libraries/net/minecraftforge/forge/1.18.2-$FORGE_VERSION/win_args.txt" fi args+=("@$args_file") args+=("nogui") # Start server "$JAVA_FILE" "${args[@]}" # Check for restart conditions if [ "$VH3_RESTART" = "true" ] && [ -f "logs/latest.log" ]; then if ! grep -q "Stopping the server" "logs/latest.log"; then restart_count=$((restart_count + 1)) if [ $restart_count -le 10 ]; then print_color $YELLOW "Restarting automatically in 10 seconds (press Ctrl + C to cancel)" sleep 10 continue fi fi fi break done
- Create a file named
- Initial Server Setup
- Run the server for the first time:
./start.sh
- The server will create necessary files and then stop
- Edit
eula.txt
and changeeula=false
toeula=true
:- nano eula.txt
- Optionally, edit
server.properties
to configure server settings:- nano server.properties
- Run the server for the first time:
- Start Your Server
- Execute
./start.sh
to start your server. First startup may take several minutes as Forge loads all mods.
- Execute