> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edmobswords/features/mob-zones.md).

# Mob zones & the wand

A mob zone is a normal EdTools regen zone (`plugins/EdTools/zones/<id>.yml`) with two differences: its `blocks:` map is empty and it carries a `mobs:` section that EdMobSwords owns (EdTools ignores it).

```yaml
world: world
min-corner: 0,0,0
max-corner: 0,0,0
load-if-player-in-bounding-box: true
tool-to-change-when-enter: "sword-tool"   # the sword is selected on entry
default-session-type: "global"            # global = shared mobs, alone = private mobs
allowed-tools:
  - "sword-tool"
replacement-block: AIR
replacement-time: 0
enable-flight-on-join: false
blocks: {}
locations: []

# ---- EdMobSwords ----
mobs:
  respawn-time: 60        # ticks until a killed mob comes back (a mob file may override it)
  #hit-distance: 6        # optional, overrides combat.hit-distance for this zone
  spawn-points:           # placed with the wand: '<mob>;<x>,<y>,<z>;<yaw>;<pitch>'
    - 'zombie;10.50,64.00,20.50;90.0;0.0'
```

Set `min-corner` and `max-corner` like any EdTools zone: walking players enter the zone through that box (and leave when they walk out of it). The wand warns you when the corners are still `0,0,0` or when you place a spawn point outside them. `/edtools zone <player> <zone> <global|alone>` puts a player into the zone from anywhere.

Everything EdTools does for a zone still applies: the tool swap on entry, the action bar and xp bar lines (`actionbar.yml` / `xpbar.yml`), per-zone sell summaries, flight, `/edtools zone`...

## Global and alone sessions

The EdTools session type of the player decides who sees which mobs:

| Session                  | Mobs                                                                                                                                                                                                                                                                              |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **global** (the default) | One shared population per zone. Every player of the session sees the **same** mobs, sees the other players hitting them (the health in the name drops, the mob flashes, damage numbers show who hit for how much), sees them die and respawn. The killing blow earns the rewards. |
| **alone**                | A private population: only that player sees and fights their mobs.                                                                                                                                                                                                                |

Mobs are always packet entities — there is never a real entity on the server — and their health is a number the server keeps, not an entity attribute. A shared mob can be hit by several players at once safely: exactly one hit lands the kill.

Switching session type (the EdTools selector GUIs / `/edtools zone`) moves the player between the shared and a private population immediately. A shared population is torn down when its last player leaves and rebuilt when someone comes back.

Health placeholders in a mob's `health` expression are resolved for the player who caused the spawn — the first player to enter for a fresh shared population, the killer for a respawn, the player themselves for private mobs.

Enchant animations (meteors, dragons, wolves...) are sent to the player whose enchant procced; the damage they deal is shared like any other hit.

## The wand

`/edmobswords wand <zone> <mob>` gives a wand bound to one zone and one mob template.

| Action              | Effect                                                             |
| ------------------- | ------------------------------------------------------------------ |
| Right-click a block | adds a spawn point on top of it, facing the way you look           |
| Left-click a block  | removes the closest spawn point within two blocks                  |
| Sneak + right-click | shows every spawn point of the zone as floating labels for a while |

Only the `spawn-points` lines of the zone file are rewritten, so your comments stay. Every population of the zone is rebuilt right away, and a running preview updates with the change.

## Respawning

A killed mob disappears for everyone and comes back at the same spawn point after `respawn-time` ticks (or the mob's own `respawn-time`).

## Membership

Players join and leave mob zones exactly when they join and leave the EdTools zone (walking, teleports, login inside the zone, `/edtools zone`). A safety check every two seconds reconciles sessions and session types with EdTools, so a missed event can never leave mobs behind.
