# How to Enable or Disable PvP on Your Minecraft Server (/docs/minecraft/toggle-pvp)



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

The `pvp` setting in `server.properties` controls whether players can damage each other. Disabling it is useful for build servers, family-friendly survival, and creative communities.

Toggle PvP [#toggle-pvp]

<Steps>
  <Step>
    Stop the server [#stop-the-server]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), open **Console** and stop your server.
  </Step>

  <Step>
    Edit server.properties [#edit-serverproperties]

    Click **Files** in the sidebar and open `server.properties`. Find the `pvp` line:

    ```properties
    pvp=false
    ```

    | Value   | Effect                                  |
    | ------- | --------------------------------------- |
    | `true`  | Players can damage each other (default) |
    | `false` | Players cannot damage each other        |

    Click **Save Content**.
  </Step>

  <Step>
    Start the server [#start-the-server]

    Start from **Console**. The change takes effect immediately on next join.
  </Step>
</Steps>

What pvp=false Does and Doesn't Block [#what-pvpfalse-does-and-doesnt-block]

| Action                                        | Blocked by `pvp=false`?                        |
| --------------------------------------------- | ---------------------------------------------- |
| Direct melee/bow damage between players       | ✅ Yes                                          |
| TNT/creeper damage from one player to another | ❌ No (still applies)                           |
| Lava/fire indirectly placed by another player | ❌ No                                           |
| Bed explosions in the Nether/End              | ❌ No                                           |
| Pet wolves/cats attacking                     | ❌ No (vanilla)                                 |
| Knockback from arrows                         | ❌ No (knockback still applies, just no damage) |

For **complete PvP protection**, combine `pvp=false` with a plugin like WorldGuard or GriefPrevention.

Per-Region PvP Control [#per-region-pvp-control]

To allow PvP only in arenas, KitPvP zones, or specific worlds, leave `pvp=true` and use [WorldGuard](/docs/minecraft/setup-worldguard):

```
/rg flag <region> pvp deny
/rg flag __global__ pvp deny
/rg flag arena pvp allow
```

This gives you fine-grained per-region control instead of a global on/off.

Common Issues [#common-issues]

| Problem                                   | Fix                                                                                           |
| ----------------------------------------- | --------------------------------------------------------------------------------------------- |
| Players still take damage from each other | They might be in a region with `pvp` flag override, or damage is from TNT/fire/etc.           |
| Can't damage other players after restart  | Working as intended — `pvp=false` is enabled                                                  |
| Plugins ignore the setting                | Some PvP plugins (Factions, mcMMO) have their own PvP toggles that override server.properties |

Related Guides [#related-guides]

* [Server Properties](/docs/minecraft/server-properties)
* [WorldGuard Setup](/docs/minecraft/setup-worldguard)
* [Set Difficulty](/docs/minecraft/set-difficulty)
