# How to Change Difficulty on Your Minecraft Server (/docs/minecraft/set-difficulty)



import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Step, Steps } from 'fumadocs-ui/components/steps';

Minecraft has four difficulty levels that affect mob behavior, hunger, and damage taken.

Change Difficulty [#change-difficulty]

<Tabs items={['Via Console (Instant)', 'Via server.properties']}>
  <Tab value="Via Console (Instant)">
    <Steps>
      <Step>
        Open the Console [#open-the-console]

        In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Console** in the sidebar.
      </Step>

      <Step>
        Run the difficulty command [#run-the-difficulty-command]

        ```
        difficulty peaceful
        difficulty easy
        difficulty normal
        difficulty hard
        ```

        The change takes effect **immediately** — no restart needed.
      </Step>
    </Steps>
  </Tab>

  <Tab value="Via server.properties">
    <Steps>
      <Step>
        Stop the server [#stop-the-server]
      </Step>

      <Step>
        Open server.properties [#open-serverproperties]

        Click **Files** in the sidebar and open `server.properties`.
      </Step>

      <Step>
        Set difficulty [#set-difficulty]

        ```
        difficulty=normal
        ```
      </Step>

      <Step>
        Save and start [#save-and-start]
      </Step>
    </Steps>
  </Tab>
</Tabs>

Difficulty Levels [#difficulty-levels]

| Level          | Hostile Mobs                  | Hunger          | Special                                             |
| -------------- | ----------------------------- | --------------- | --------------------------------------------------- |
| **`peaceful`** | None spawn — existing despawn | No hunger drain | Health regenerates constantly                       |
| **`easy`**     | Spawn with low damage         | Drains slowly   | Can't starve below 5 hearts                         |
| **`normal`**   | Spawn with standard damage    | Standard drain  | Can starve to half a heart                          |
| **`hard`**     | Spawn with maximum damage     | Fast drain      | **Can starve to death**. Zombies break wooden doors |

Hardcore Mode [#hardcore-mode]

For permadeath gameplay, enable Hardcore mode in addition to setting difficulty to `hard`. See [Hardcore Mode](/docs/minecraft/hardcore-mode).

Lock the Difficulty [#lock-the-difficulty]

To prevent players from changing difficulty in their own world settings, set:

```
difficulty=hard
```

In single-player worlds, players can override server difficulty. On dedicated servers, the server's setting always wins.

Related Guides [#related-guides]

* [Server Properties](/docs/minecraft/server-properties)
* [Hardcore Mode](/docs/minecraft/hardcore-mode)
* [Toggle Monsters](/docs/minecraft/toggle-monsters)
* [Toggle PvP](/docs/minecraft/toggle-pvp)
