> 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/reference/events.md).

# Internal Events (Developer API)

AtomCombat's modules never call each other's internal classes directly. Instead, every meaningful moment fires a public Bukkit event under `dev.amargos.main.atomcombat.events`, and every module (or your own plugin, or PulsePrison) subscribes to those events like any other Bukkit listener. This is also how AtomCombat's own [Effects](/atomcombat/modules/effects.md) module works — it has no special access, it just listens.

To depend on these events from another plugin, add AtomCombat as a `softdepend` (or `depend`) in your `plugin.yml` and register a normal `@EventHandler` method.

## `AtomCombatHitEvent`

Fired by Combat Core on every valid attack, before a kill is determined.

| Field                       | Type                            | Notes                                  |
| --------------------------- | ------------------------------- | -------------------------------------- |
| `getAttacker()`             | `Player`                        |                                        |
| `getVictim()`               | `LivingEntity`                  |                                        |
| `getDamage()`               | `double`                        |                                        |
| `getAttackIntervalMillis()` | `long`                          | `-1` if no previous attack was tracked |
| `getWeapon()`               | `ItemStack`                     | Cloned, nullable                       |
| `getCause()`                | `EntityDamageEvent.DamageCause` |                                        |
| `getTimestampMillis()`      | `long`                          |                                        |

## `AtomCombatKillEvent`

Fired once per confirmed PvP kill, after recap data has been assembled.

| Field                                               | Type                            | Notes                                          |
| --------------------------------------------------- | ------------------------------- | ---------------------------------------------- |
| `getKillId()`                                       | `UUID`                          | Unique per kill                                |
| `getKiller()` / `getKillerId()` / `getKillerName()` |                                 | Killer may be offline (`getKiller()` nullable) |
| `getVictim()` / `getVictimId()` / `getVictimName()` |                                 |                                                |
| `getFinalDamage()`                                  | `double`                        |                                                |
| `getCause()`                                        | `EntityDamageEvent.DamageCause` |                                                |
| `getWeapon()`                                       | `ItemStack`                     | Cloned, nullable                               |
| `getRecap()`                                        | `List<CombatDamageRecord>`      | Recent damage history before death             |
| `getTimestampMillis()`                              | `long`                          |                                                |
| `isCombatLogout()`                                  | `boolean`                       | True if the victim disconnected while tagged   |

## `AtomCombatKillstreakEvent`

Fired by [Bounties](/atomcombat/modules/bounties.md#killstreaks) each time a player crosses a configured killstreak threshold.

| Field                                               | Type                           |
| --------------------------------------------------- | ------------------------------ |
| `getPlayer()` / `getPlayerId()` / `getPlayerName()` |                                |
| `getStreak()`                                       | `int` — current streak         |
| `getThreshold()`                                    | `int` — threshold just crossed |
| `getTimestampMillis()`                              | `long`                         |

## `AtomCombatMilestoneEvent`

Fired by [Stats](/atomcombat/modules/stats.md#milestones) each time a player's lifetime kill count crosses a configured threshold.

| Field                           | Type                                  |
| ------------------------------- | ------------------------------------- |
| `getPlayer()` / `getPlayerId()` |                                       |
| `getMetric()`                   | `String` — currently always `"kills"` |
| `getThreshold()`                | `int`                                 |
| `getTimestampMillis()`          | `long`                                |

## `AtomCombatBountyPlacedEvent`

Fired by [Bounties](/atomcombat/modules/bounties.md) the moment a bounty is successfully placed and paid for.

| Field                  | Type     |
| ---------------------- | -------- |
| `getBountyId()`        | `UUID`   |
| `getCreator()`         | `Player` |
| `getTargetId()`        | `UUID`   |
| `getAmount()`          | `double` |
| `getTimestampMillis()` | `long`   |

## `AtomCombatBountyClaimedEvent`

Fired by [Bounties](/atomcombat/modules/bounties.md) when a bounty is paid out on a confirmed kill.

| Field                             | Type                                                     |
| --------------------------------- | -------------------------------------------------------- |
| `getBountyId()` / `getKillId()`   | `UUID`                                                   |
| `getTargetId()` / `getKillerId()` | `UUID`                                                   |
| `getAmount()`                     | `double`                                                 |
| `getRewardProvider()`             | `String` — `vault`, `pulseprison`, `items` or `commands` |
| `getStatus()`                     | `ClaimStatus` — currently always `COMPLETED`             |
| `getTimestampMillis()`            | `long`                                                   |

## `AtomCombatAbilityUsedEvent`

Fired by [Rank Abilities](/atomcombat/modules/rank-abilities.md) every time an ability is successfully activated.

| Field                           | Type                                                                                         |
| ------------------------------- | -------------------------------------------------------------------------------------------- |
| `getPlayer()` / `getPlayerId()` |                                                                                              |
| `getAbilityId()`                | `String` — `dash`, `charged-strike`, `ground-slam`                                           |
| `getMetadata()`                 | `Map<String, String>` — ability-specific extra data (e.g. Ground Slam includes `%affected%`) |
| `getTimestampMillis()`          | `long`                                                                                       |

## `AtomCombatCombatTagEvent`

Fired by [Combat Rules](/atomcombat/modules/combat-rules.md) whenever a player newly enters or refreshes a combat tag.

| Field                           | Type                                         |
| ------------------------------- | -------------------------------------------- |
| `getPlayer()` / `getPlayerId()` |                                              |
| `getOpponentId()`               | `UUID` — the other player involved           |
| `getDurationSeconds()`          | `long` — remaining tag duration at fire time |
| `getTimestampMillis()`          | `long`                                       |

## Example: reacting to a kill from another plugin

```java
@EventHandler
public void onAtomCombatKill(AtomCombatKillEvent event) {
    Player killer = event.getKiller();
    if (killer != null) {
        killer.sendMessage("Nice kill on " + event.getVictimName() + "!");
    }
}
```


---

# 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/reference/events.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.
