# CombatTag
Combat logging doesn't get you out of a fight — it just kills you.
No dependencies, no database, no setup. Drop it in and it works.
## How it works
Take or deal PvP damage and you're tagged for 60 seconds. Disconnect while tagged and the
plugin resolves the fight the way it would have ended anyway:
- Your inventory, armour and offhand **drop where you logged out**
- Your XP drops as an orb, using the vanilla formula (7 per level, capped at 100)
- You're reset to post-respawn state — full health, fed, effects cleared
- Next time you join, you **respawn at spawn, empty-handed**
No ban. No hour-long timeout. No punishing the person who *didn't* run.
The `keepInventory` gamerule is respected by default, so the plugin behaves like a real
death on your server — or override it if you'd rather it always bite.
## Features
### Fair tagging
Melee, projectiles **and tamed pets** all tag. Setting your wolf on someone isn't a free
escape route.
### Four display modes, chosen per player
Everyone picks how their own timer looks — `actionbar`, `title`, `bossbar` or `chat`.
Nobody is stuck with a display they hate.
### Preferences that actually persist
Each player controls their own notifications with `/combattag receive`:
| Option | Controls |
|---|---|
| `stoptimer` | Whether others can send you stop-timer requests |
| `combatnotify` | Your combat timer display |
| `logalert` | Alerts when someone combat-logs on you |
| `sound` | All plugin sound effects |
Settings save the moment they change **and again when the player leaves**. They survive
restarts, crashes and reloads.
### Mutual stop-timer
Fight ended in a truce? `/combattag stoptimer <player>` asks your opponent to end the timer
early. They have 15 seconds to `/combattag accept`, and both timers clear at once.
### Safezones
Cuboid regions per world, defined entirely in-game. Two independent toggles: **block PvP**
inside them, and **end combat** the moment a tagged player walks in. Ideal for spawn, shops
and hubs — no WorldGuard needed.
### Tab completion that helps
Safezone coordinates suggest your current block position, so you can define a region by
standing at each corner and pressing Tab. Admin commands stay hidden from players without
permission.
## Commands
| Command | Description |
|---|---|
| `/combattag help` | Command list |
| `/combattag status` | Your settings and remaining combat time |
| `/combattag display <mode>` | `actionbar`, `title`, `bossbar` or `chat` |
| `/combattag receive <option> <true\|false>` | Toggle a notification |
| `/combattag reset` | Reset your preferences |
| `/combattag stoptimer <player>` | Ask an opponent to end the timer |
| `/combattag accept` | Accept a stop-timer request |
### Admin
| Command | Description |
|---|---|
| `/combattag safezone create <x1> <y1> <z1> <x2> <y2> <z2> <name>` | Create a zone in your current world |
| `/combattag safezone delete <name>` | Delete a zone |
| `/combattag safezone edit <name> change-name <newName>` | Rename a zone |
| `/combattag safezone edit <name> change-cords <x1> <y1> <z1> <x2> <y2> <z2>` | Move a zone |
| `/combattag safezone list` | List all zones |
| `/combattag reload` | Reload config, prefs and safezones |
## Permissions
| Node | Default | Grants |
|---|---|---|
| `combattag.admin` | op | Safezone and reload commands |
| `combattag.bypass` | false | Never gets combat tagged — for staff and event hosts |
Everything else is available to all players.
## Configuration
```yaml
# How long (in seconds) a player stays tagged after taking or dealing PvP damage.
combat-seconds: 60
# How long (in seconds) the other player has to accept a stoptimer request.
stoptimer-request-seconds: 15
# Ends the combat timer as soon as a tagged player walks into a safezone.
safezone-cancels-combat: true
# Cancels PvP damage when either player is standing inside a safezone.
safezone-blocks-pvp: true
# --- What happens when a tagged player disconnects ---
combatlog-drop-inventory: true
combatlog-drop-experience: true
combatlog-respect-keep-inventory: true
combatlog-teleport-to-spawn: true
combatlog-broadcast: true
```
> **Leave `combatlog-teleport-to-spawn` on.** With it off, a combat-logger reconnects standing
> on top of their own dropped items and picks everything straight back up.
Player preferences live in `prefs.yml` and safezones in `safezones.yml`. Both are managed by
the plugin — edit them only while the server is stopped.
## Compatibility
**One jar for everything.** Built against the plain Bukkit API — no Adventure, no
Paper-specific classes — and compiled to Java 17 bytecode.
| Platform | |
|---|---|
| Bukkit · Spigot · Paper · Purpur · Pufferfish | ✅ Supported |
| Folia | ❌ Not supported |
| Forge · NeoForge · Fabric | ❌ Different platform |
Server-side only. Players need nothing installed.
## Installation
1. Drop the jar into `plugins/`
2. Restart the server
3. Edit `plugins/CombatTag/config.yml`, then `/combattag reload`