> For the complete documentation index, see [llms.txt](https://mode-development.gitbook.io/atomcombat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mode-development.gitbook.io/atomcombat/modules/combat-rules.md).

# Combat Rules

Config file: `modules/combat-rules.yml`

## Combat tag

```yaml
combat-tag:
  enabled: true
  duration-seconds: 15
  blocked-actions:
    teleport: true
    commands: [spawn, home, tpa, tpaccept]
    logout:
      enabled: true
      punishment: kill
      commands: []
```

Both players are tagged "in combat" the moment either one deals or receives PvP damage. While tagged:

* Teleporting is blocked if `blocked-actions.teleport` is `true`.
* Any command in `blocked-actions.commands` (without the leading `/`) is blocked.
* Logging out while tagged triggers `blocked-actions.logout.punishment`: `kill` (the player dies on disconnect) and/or the configured `commands` are run as console.

Fires `AtomCombatCombatTagEvent` on tag (see [Internal Events](/atomcombat/reference/events.md)), which the [Effects](/atomcombat/modules/effects.md) module uses to show an action bar countdown.

## Grace periods

```yaml
grace-period:
  enabled: true
  new-player:
    enabled: true
    duration-seconds: 300
  respawn:
    enabled: true
    duration-seconds: 10
```

Full PvP immunity for brand-new players on their first join, and for a short window after every respawn.

## PvP, keep-inventory, keep-experience

```yaml
pvp:
  default: true
  respect-worldguard-flag: true
  worlds: {}
  regions: {}
keep-inventory:
  default: false
  worlds: {}
  regions: {}
keep-experience:
  default: false
  worlds: {}
  regions: {}
```

Each of these three rules has a server-wide default plus per-world and per-WorldGuard-region overrides. `pvp.respect-worldguard-flag` additionally lets a WorldGuard region's own PVP flag block PvP even where AtomCombat's own rule would allow it.

## Notifications

```yaml
notifications:
  enabled: true
```

Controls whether players get a chat message when tagged, when a blocked action is denied, or when PvP/grace-period rules stop an attack. This is independent of the action bar countdown from the [Effects](/atomcombat/modules/effects.md) module.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mode-development.gitbook.io/atomcombat/modules/combat-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
