Fix troubleshooting section anchor in generated docs
Move start script, service setup, and troubleshooting sections outside the conditional block to ensure they appear in all generated documentation regardless of whether detailed XML startup params exist. Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
f8ae24e87b
commit
7fe56d207f
3 changed files with 366 additions and 121 deletions
|
|
@ -26,7 +26,7 @@
|
|||
<h2 id="quick-info">Quick Info</h2>
|
||||
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
|
||||
<ul style="color: #e5e7eb; line-height: 1.8; margin: 0;">
|
||||
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">25565</code></li>
|
||||
<li><strong style="color: #ffffff;">Default Port:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">Varies (see configuration)</code></li>
|
||||
<li><strong style="color: #ffffff;">Protocol:</strong> TCP/UDP</li>
|
||||
<li><strong style="color: #ffffff;">Minimum RAM:</strong> 1GB</li>
|
||||
<li><strong style="color: #ffffff;">Engine:</strong> Various</li>
|
||||
|
|
@ -38,28 +38,7 @@
|
|||
<h2 id="ports">🔌 Network Ports</h2>
|
||||
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
|
||||
<h3 style="color: #ffffff; margin-top: 0;">Required Ports</h3>
|
||||
<p style="color: #e5e7eb;">The following ports are used by this game server:</p>
|
||||
<table style="width: 100%; color: #e5e7eb; border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr style="background: #0f172a;">
|
||||
<th style="padding: 10px; text-align: left; color: #ffffff;">Port</th>
|
||||
<th style="padding: 10px; text-align: left; color: #ffffff;">Protocol</th>
|
||||
<th style="padding: 10px; text-align: left; color: #ffffff;">Purpose</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr style="border-bottom: 1px solid #374151;">
|
||||
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">25565</code></td>
|
||||
<td style="padding: 10px;">TCP</td>
|
||||
<td style="padding: 10px;">Game/Query port</td>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid #374151;">
|
||||
<td style="padding: 10px;"><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">25575</code></td>
|
||||
<td style="padding: 10px;">TCP</td>
|
||||
<td style="padding: 10px;">RCON (if enabled)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="color: #e5e7eb;">The Minecraft Server server typically uses a configurable port. Check your server configuration files for the specific port settings.</p>
|
||||
|
||||
<h3 style="color: #ffffff; margin-top: 20px;">Firewall Configuration</h3>
|
||||
<p style="color: #e5e7eb;">Allow server ports through your firewall:</p>
|
||||
|
|
@ -149,68 +128,33 @@ setadminpassword [password]
|
|||
|
||||
<h2 id="parameters">⚙️ Startup Parameters</h2>
|
||||
|
||||
<h3>Basic Startup</h3>
|
||||
<pre><code># Generic startup command structure
|
||||
./server_executable [parameters]
|
||||
</code></pre>
|
||||
<h3>Command Line Template</h3>
|
||||
<p>The server uses the following command line template:</p>
|
||||
<pre><code>java %XMS% %XMX% -jar minecraft_server.jar nogui</code></pre>
|
||||
|
||||
<h3>Common Parameters</h3>
|
||||
<ul>
|
||||
<li><code>-port [number]</code> - Set the server port</li>
|
||||
<li><code>-maxplayers [number]</code> - Maximum player slots</li>
|
||||
<li><code>-map [name]</code> - Starting map/level</li>
|
||||
<li><code>-console</code> - Enable console output</li>
|
||||
<li><code>-nographics</code> - Run without graphics (headless mode)</li>
|
||||
</ul>
|
||||
<h3>Available Startup Parameters</h3>
|
||||
<p>The following parameters can be configured when starting the server:</p>
|
||||
|
||||
<h3>Creating a Start Script</h3>
|
||||
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
|
||||
|
||||
<p><strong>Linux (start.sh):</strong></p>
|
||||
<pre><code>#!/bin/bash
|
||||
cd /path/to/server
|
||||
./server_executable [parameters] 2>&1 | tee server.log
|
||||
</code></pre>
|
||||
<pre><code>chmod +x start.sh
|
||||
./start.sh
|
||||
</code></pre>
|
||||
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
|
||||
<h4 style="color: #ffffff; margin-top: 0;">
|
||||
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-Xms</code>
|
||||
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - -Xms</span>
|
||||
</h4>
|
||||
<p style="color: #e5e7eb; margin: 10px 0;">Initial memory size for Java can be specified.</p>
|
||||
<p style="color: #fbbf24;"><strong>Default:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">1024M</code></p>
|
||||
</div>
|
||||
|
||||
<p><strong>Windows (start.bat):</strong></p>
|
||||
<pre><code>@echo off
|
||||
cd /d "%~dp0"
|
||||
server_executable.exe [parameters]
|
||||
pause
|
||||
</code></pre>
|
||||
|
||||
<h3>Running as a Service</h3>
|
||||
|
||||
<p><strong>Linux (systemd):</strong></p>
|
||||
<pre><code># Create service file: /etc/systemd/system/gameserver.service
|
||||
[Unit]
|
||||
Description=Minecraft Server Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=gameserver
|
||||
WorkingDirectory=/home/gameserver/server
|
||||
ExecStart=/home/gameserver/server/start.sh
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
</code></pre>
|
||||
|
||||
<pre><code># Enable and start service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable gameserver
|
||||
sudo systemctl start gameserver
|
||||
sudo systemctl status gameserver
|
||||
</code></pre>
|
||||
|
||||
<h2 id="troubleshooting">🔧 Troubleshooting</h2>
|
||||
|
||||
<h3>Server Won't Start</h3>
|
||||
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
|
||||
<h4 style="color: #ffffff; margin-top: 0;">
|
||||
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-Xmx</code>
|
||||
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - -Xmx</span>
|
||||
</h4>
|
||||
<p style="color: #e5e7eb; margin: 10px 0;">Maximum memory size for Java can be specified.</p>
|
||||
<p style="color: #fbbf24;"><strong>Default:</strong> <code style="background: #0f172a; padding: 2px 6px; border-radius: 3px;">1024M</code></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Check Server Logs</h4>
|
||||
<pre><code># View recent log entries
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue