# server.properties 設定檔

在編輯 server.properties 時，行之間的順序可以打亂，但檔案結構不能改變。每一行的等號之前的文字為變數名，你不可以修改這些內容。等號後面為變數的值，你可以按照規則自行編輯。以`#`開頭的行為註解，加入、修改或移除注釋行不會對遊戲造成影響。

## 開始編輯

1. 前往檔案管理，找到 `server.properties` 檔案。\
   (如果找不到檔案，可以在網頁用 Ctrl + F 鍵尋找：Mac 用戶則使用 ⌘ Command + F 搜尋)

<figure><img src="/files/4Ho0wS2VJNIPCWIjLkS1" alt=""><figcaption></figcaption></figure>

2. 接下來你會看到以下內容。

<figure><img src="/files/usz4KFeqpsuYvesx4xrV" alt=""><figcaption></figcaption></figure>

3. 編輯完成後，點擊儲存內容。

<figure><img src="/files/T0kWjmNoTSFhNGfcEop8" alt=""><figcaption></figcaption></figure>

4. 回到控制後台，點擊重啟。

<figure><img src="/files/JTYaMfNnPj3fcCSvTUVq" alt=""><figcaption></figcaption></figure>

## 常用參數說明

由參數有超過 60 個，這邊只會列出常用參數，如果你想了解所有功用，請前往 [Minecraft Wiki](https://minecraft.fandom.com/zh) 網站。

<table><thead><tr><th width="271">參數</th><th width="157">預設值</th><th>說名</th></tr></thead><tbody><tr><td>allow-flight</td><td>false</td><td><p>允許玩家在安裝加入飛行功能的模組或外掛前提下在生存模式下飛行。</p><ul><li>false - 不允許飛行。懸空超過5秒的玩家會被踢出伺服器。 </li><li>true - 允許飛行。玩家得以使用任何能飛行的mod飛行。</li></ul></td></tr><tr><td>allow-nether</td><td>true</td><td><p>允許玩家進入地獄。</p><ul><li>false - 地獄傳送門不會生效。</li><li>true - 玩家可以透過地獄傳送門前往地獄。</li></ul></td></tr><tr><td>difficulty</td><td>easy</td><td><p>定義伺服器的遊戲難易度-</p><ul><li><strong>peaceful</strong> – 和平</li><li><strong>easy</strong> – 簡單</li><li><strong>normal</strong> – 普通</li><li><strong>hard</strong> – 困難</li></ul></td></tr><tr><td>enable-command-block</td><td>false</td><td>是否啟用指令方塊。</td></tr><tr><td>gamemode</td><td>survival</td><td><p>定義預設遊戲模式。</p><ul><li><strong>survival</strong> – 生存模</li><li><strong>creative</strong> – 創造模式</li><li><strong>adventure</strong> – 冒險模式</li><li><strong>spectator</strong> – 旁觀者模式</li></ul></td></tr><tr><td>level-name</td><td>world</td><td>「level-name」 的值將作為世界名稱及其資料夾名</td></tr><tr><td>level-seed</td><td>空白</td><td>與單人遊戲類似，世界的種子碼。</td></tr><tr><td>max-players</td><td>20</td><td>設定伺服器同時能容納的最大玩家數量。在擁有 OP 權限的玩家可以跳過限制加入。</td></tr><tr><td>motd</td><td>A Minecraft Server</td><td>motd 是玩家端的多人遊戲伺服器列表中顯示的伺服器資訊，顯示於名稱下方。如果有中文或特殊符號必須轉為 Unicode 字元，否則無法顯示。</td></tr><tr><td>online-mode</td><td>true</td><td><p>是否開啟正版驗證</p><ul><li><strong>true</strong> – 開啟正版驗證</li><li><strong>false</strong> – 關閉正版驗證</li></ul></td></tr><tr><td>pvp</td><td>true</td><td><p>是否允許 PvP。</p><ul><li>true - 玩家可以互相傷害。</li><li>false - 玩家無法互相造成傷害（也稱作玩家對戰環境（PvE））。</li></ul></td></tr><tr><td>server-ip</td><td>0.0.0.0</td><td>將伺服器綁定 IP 。<br>(<mark style="color:red;">在 CheapServer 上，請不要變更或移除此參數，伺服器會自動調整。</mark>)</td></tr><tr><td>server-port</td><td>25565</td><td>伺服器的埠。<br>(<mark style="color:red;">在 CheapServer 上，請不要變更或移除此參數，伺服器會自動調整。</mark>)</td></tr><tr><td>spawn-animals</td><td>true</td><td><p>決定動物是否可以生成。</p><ul><li>true - 動物可以正常生成。</li><li>false - 動物生成後會立即消失。</li></ul><p>提示：如果你有嚴重的卡頓，可以設為 false。</p></td></tr><tr><td>spawn-monsters</td><td>true</td><td><p>決定攻擊型生物（怪物）是否可以生成。</p><ul><li>true - 啟用。怪物會生成於夜晚和黑暗處。</li><li>false - 停用。不會有任何怪物。</li></ul><p>如果 difficulty=0（即難易度設定為和平）的話，該屬性值不會有任何影響。</p><p>提示：如果你有嚴重的卡頓，可以設為false。</p></td></tr><tr><td>spawn-npcs</td><td>true</td><td><p>決定是否生成村民。</p><ul><li>true - 啟用生成村民。</li><li>false - 停用，不生成村民。</li></ul></td></tr><tr><td>white-list</td><td>false</td><td><p>是否啟用伺服器的白名單。<br>當啟用時只有在白名單內玩家才能進入伺服器。</p><ul><li><strong>false</strong> – 不啟用白名單。</li><li><strong>true</strong> – 開啟白名單。</li></ul><p>提示：OP會自動被視為在白名單上，所以無需再將OP加入白名單。</p></td></tr></tbody></table>

## 資料來源

* [Minecraft Wiki](https://minecraft.fandom.com/zh)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cheapserver.tw/game/minecraft/server.properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
