> For the complete documentation index, see [llms.txt](https://realisticnode.gitbook.io/rnsetups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://realisticnode.gitbook.io/rnsetups/rncombatpvp/configuration/config.md).

# config.yml

Every option of config.yml.

Every option can also be changed in game with `/combat editor`, except the MySQL details and `server-id`, the money separators, the streak milestones and the sounds. Times are in seconds unless the option says otherwise.

## General

| Option                | Default | What it does                                                                                             |
| --------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| `language`            | `en`    | Language file of `languages/` (`en`, `es`, or your own)                                                  |
| `per-player-language` | `false` | Each player gets the language of their Minecraft client when that file exists                            |
| `update-checker`      | `true`  | Tell admins when a new version is out. See [Updating](/rnsetups/rncombatpvp/getting-started/updating.md) |
| `auto-reload`         | `true`  | Apply files saved by hand without `/combat reload`                                                       |
| `disabled-worlds`     | `[]`    | Worlds where rnCombatPvP does nothing at all: no combat, no protections, no rewards                      |

## Storage

| Option                                                           | Default                                            | What it does                                                                                                                                                                                                     |
| ---------------------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `storage.type`                                                   | `SQLITE`                                           | `SQLITE` (the file `data/combat.db`) or `MYSQL`                                                                                                                                                                  |
| `storage.mysql.host` / `port` / `database` / `user` / `password` | `localhost` / `3306` / `minecraft` / `root` / `""` | MySQL connection                                                                                                                                                                                                 |
| `storage.mysql.properties`                                       | `useSSL=false&...`                                 | Extra connection settings                                                                                                                                                                                        |
| `storage.server-id`                                              | `""`                                               | Several servers with one MySQL database: give each server its own name (`survival`, `factions`...). A combat log punishment is then applied on the server where it happened, not on the lobby. `""` = one server |

The plugin makes its tables (`rncombat_players`, `rncombat_bounties`) by itself. A player's data is read before they enter the world, and every read and write runs on its own thread, never on the server's.

## Money

| Option                              | Default                  | What it does                                              |
| ----------------------------------- | ------------------------ | --------------------------------------------------------- |
| `money.format`                      | `<gold>${amount}</gold>` | How money looks. `{amount}` is the number with separators |
| `money.decimals`                    | `2`                      | Decimals shown                                            |
| `money.thousands` / `money.decimal` | `,` / `.`                | Separators: `1,250.50`. Use `.` and `,` for `1.250,50`    |

## Combat

| Option                               | Default                                                                                                                       | What it does                                                                                         |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `combat.time`                        | `20`                                                                                                                          | Seconds in combat after the last hit. Ranks: `rncombat.time.<seconds>` (the lowest counts)           |
| `combat.tag-on.projectiles`          | `true`                                                                                                                        | Arrows, tridents, snowballs with damage, wind charges...                                             |
| `combat.tag-on.harmful-potions`      | `true`                                                                                                                        | Splash and lingering potions with a harmful effect                                                   |
| `combat.tag-on.explosions`           | `true`                                                                                                                        | TNT, end crystals, respawn anchors and beds set off by a player                                      |
| `combat.tag-on.fire-and-lava`        | `true`                                                                                                                        | Fire and lava a player placed or lit in the last 10 seconds                                          |
| `combat.tag-on.pets`                 | `true`                                                                                                                        | Wolves and other tamed pets attacking for their owner                                                |
| `combat.tag-on.no-damage-hits`       | `false`                                                                                                                       | Hits that do no damage (eggs, snowballs, fishing rods)                                               |
| `combat.mobs.enabled`                | `false`                                                                                                                       | Fighting mobs puts players in combat too                                                             |
| `combat.mobs.time`                   | `8`                                                                                                                           | Seconds in combat after a mob fight                                                                  |
| `combat.mobs.list`                   | `[]`                                                                                                                          | Mob names that count (`ZOMBIE`, `WARDEN`...). Empty = every hostile mob                              |
| `combat.end-when-enemies-gone`       | `true`                                                                                                                        | Combat ends as soon as every enemy of the fight died or left (`false` = only when the time runs out) |
| `combat.ender-pearl-renews`          | `true`                                                                                                                        | Throwing an ender pearl in combat starts the timer again                                             |
| `combat.glowing`                     | `false`                                                                                                                       | Tagged players glow                                                                                  |
| `combat.close-inventory`             | `false`                                                                                                                       | The open inventory is closed when combat starts                                                      |
| `combat.disable-on-tag.fly`          | `true`                                                                                                                        | Flying stops (given back after combat)                                                               |
| `combat.disable-on-tag.gamemode`     | `true`                                                                                                                        | Creative, adventure and spectator go back to survival                                                |
| `combat.disable-on-tag.invisibility` | `true`                                                                                                                        | Invisibility is removed                                                                              |
| `combat.disable-on-tag.elytra`       | `true`                                                                                                                        | Players gliding with elytra fall                                                                     |
| `combat.harmful-effects`             | slowness, mining\_fatigue, nausea, blindness, hunger, weakness, poison, wither, levitation, unluck, darkness, instant\_damage | Effects that count as an attack: potions with them tag, and they never reach protected players       |

See [Combat tag](/rnsetups/rncombatpvp/guides/combat-tag.md).

## Display

| Option                                      | Default         | What it does                                                                                       |
| ------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------- |
| `display.action-bar`                        | `true`          | Time and enemy in the action bar                                                                   |
| `display.boss-bar`                          | `true`          | Boss bar with the time left                                                                        |
| `display.boss-bar-color`                    | `RED`           | `PINK`, `BLUE`, `RED`, `GREEN`, `YELLOW`, `PURPLE` or `WHITE`                                      |
| `display.boss-bar-color-by-time`            | `true`          | The boss bar turns yellow and then green as combat is about to end                                 |
| `display.bar-length`                        | `20`            | Characters of the progress bar in the action bar (`{bar}`)                                         |
| `display.bar-symbol`                        | `\|`            | Character of the progress bar                                                                      |
| `display.title-on-enter` / `title-on-leave` | `true` / `true` | A title when combat starts / ends                                                                  |
| `display.countdown-seconds`                 | `3`             | A tick sound in the last seconds of combat (`0` = off)                                             |
| `display.low-health-tint`                   | `true`          | Red screen edges when a player in combat has little health                                         |
| `display.low-health-percent`                | `30`            | Health percent from which the red screen shows                                                     |
| `display.damage-indicators`                 | `true`          | Damage numbers that only the attacker sees                                                         |
| `display.damage-indicators-on-mobs`         | `false`         | Damage numbers on mobs too                                                                         |
| `display.blood`                             | `true`          | Red particles when a player is hit                                                                 |
| `display.nametag-prefix`                    | `""`            | Prefix in front of the name while in combat, e.g. `"<red>⚔ "`. Uses scoreboard teams, not on Folia |

## Restrictions

| Option                                       | Default                                                           | What it does                                                                                                                                                      |
| -------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `restrictions.commands.mode`                 | `WHITELIST`                                                       | `WHITELIST`: only the listed commands work in combat. `BLACKLIST`: the listed commands are blocked                                                                |
| `restrictions.commands.list`                 | `[ct, combattag, combatlog, combat, rncombat, rncombatpvp, cpvp]` | Commands of the list. `home` covers `/home` and its subcommands. By default only the commands of rnCombatPvP; add `msg`, `tell`, `r`... to allow private messages |
| `restrictions.ender-pearls`                  | `false`                                                           | No ender pearls in combat (by default they work, with the 8 s cooldown)                                                                                           |
| `restrictions.chorus-fruit`                  | `true`                                                            | No chorus fruit in combat                                                                                                                                         |
| `restrictions.riptide`                       | `true`                                                            | No riptide in combat                                                                                                                                              |
| `restrictions.elytra`                        | `true`                                                            | Players can't start gliding                                                                                                                                       |
| `restrictions.firework-boost`                | `true`                                                            | No rockets while gliding                                                                                                                                          |
| `restrictions.totems`                        | `false`                                                           | Totems don't save players in combat                                                                                                                               |
| `restrictions.place-blocks` / `break-blocks` | `false` / `false`                                                 | No placing / breaking blocks                                                                                                                                      |
| `restrictions.containers`                    | `true`                                                            | No chests, ender chests, barrels, shulker boxes, furnaces...                                                                                                      |
| `restrictions.teleports`                     | `true`                                                            | No teleports by commands and plugins                                                                                                                              |
| `restrictions.interact`                      | `[]`                                                              | Blocks that can't be right clicked: names or endings (`DOOR`, `TRAPDOOR`, `FENCE_GATE`, `BUTTON`)                                                                 |

Players with `rncombat.bypass.restrictions` ignore all of it, and `rncombat.bypass.commands` only the commands.

## Item cooldowns

```yaml
item-cooldowns:
  combat:
    ENDER_PEARL: 8
    WIND_CHARGE: 1
    ENCHANTED_GOLDEN_APPLE: 30
  always: {}
```

Item name and seconds. `combat` only counts while in combat, `always` everywhere. Shown on the hotbar like the vanilla cooldown. See [Item cooldowns](/rnsetups/rncombatpvp/guides/combat-tag.md#item-cooldowns).

## Combat log

| Option                                | Default                                                                                                         | What it does                                                                                                                                                                                                                                        |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `combat-log.punishment`               | `KILL`                                                                                                          | `NPC`, `KILL` or `NOTHING`                                                                                                                                                                                                                          |
| `combat-log.npc.seconds`              | `20`                                                                                                            | How long the NPC stays (1 - 600)                                                                                                                                                                                                                    |
| `combat-log.npc.fallback`             | `ZOMBIE`                                                                                                        | Before 1.21.9: `ZOMBIE` (a husk with the player's head; a villager in peaceful worlds), `KILL` or `NOTHING`                                                                                                                                         |
| `combat-log.money-penalty`            | `0`                                                                                                             | Money taken: an amount (`500`) or a percent (`"10%"`). `0` = off                                                                                                                                                                                    |
| `combat-log.commands`                 | `[]`                                                                                                            | Console commands. `{player}` = who left, `{enemy}` = last enemy                                                                                                                                                                                     |
| `combat-log.kick-reasons-that-punish` | `["another location", "timed out", "spam", "illegal", "flying", "invalid", "cheat", "hack", "disconnect.spam"]` | Kicks by staff or plugins are not punished. On Paper the cause of the kick decides (logging in from another place, timeouts, spam and the server's cheat kicks are punished); on Spigot only kicks whose reason has one of these words are punished |
| `combat-log.tell-on-join`             | `true`                                                                                                          | Players with a pending punishment are told why when they join                                                                                                                                                                                       |

See [Combat log and NPCs](/rnsetups/rncombatpvp/guides/combat-log.md).

## Protections

| Option                                   | Default | What it does                                                                                    |
| ---------------------------------------- | ------- | ----------------------------------------------------------------------------------------------- |
| `pvp-toggle.enabled`                     | `true`  | Players can use `/pvp`                                                                          |
| `pvp-toggle.default`                     | `true`  | PvP of new players is on                                                                        |
| `pvp-toggle.cooldown`                    | `180`   | Seconds between two uses of `/pvp` (3 minutes)                                                  |
| `pvp-toggle.forced-worlds`               | `[]`    | Worlds where PvP is always on                                                                   |
| `newbie-protection.enabled`              | `true`  | New players are protected                                                                       |
| `newbie-protection.minutes`              | `15`    | Minutes of **play** time                                                                        |
| `newbie-protection.allow-disable`        | `true`  | Players may end it with `/newbie disable`                                                       |
| `newbie-protection.can-attack`           | `false` | Newbies can hit other players (it ends their protection)                                        |
| `newbie-protection.block-pvp-loot`       | `true`  | Newbies can't pick up items dropped by PvP deaths                                               |
| `newbie-protection.boss-bar`             | `true`  | Boss bar with the time left                                                                     |
| `respawn-protection.seconds`             | `5`     | Seconds of protection after respawning (`0` = off)                                              |
| `respawn-protection.ends-when-attacking` | `true`  | Hitting someone ends it                                                                         |
| `anti-clean-seconds`                     | `0`     | After a kill, players who were not in that fight can't hit the killer for this long (`0` = off) |
| `duel-lock`                              | `false` | Two players fighting each other can't be hit by anyone else until their fight ends              |

See [Protections](/rnsetups/rncombatpvp/guides/protections.md).

## Safe zones

| Option                      | Default             | What it does                                                                             |
| --------------------------- | ------------------- | ---------------------------------------------------------------------------------------- |
| `safe-zones.block-entering` | `true`              | Players in combat can't walk, pearl or teleport into a WorldGuard region with `pvp deny` |
| `safe-zones.push-back`      | `0.7`               | How hard they are pushed back (`0` = only stopped, up to `3`)                            |
| `safe-zones.wall`           | `true`              | A glass wall only players in combat see, at the edge of nearby safe zones                |
| `safe-zones.wall-material`  | `RED_STAINED_GLASS` | Block of the wall                                                                        |
| `safe-zones.wall-radius`    | `6`                 | How far from the player the wall is drawn (2 - 12 blocks)                                |

See [Safe zones](/rnsetups/rncombatpvp/guides/safe-zones.md).

## Kills

| Option                                  | Default                                           | What it does                                                                               |
| --------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `kills.money`                           | `0`                                               | Money the killer gets from the server                                                      |
| `kills.steal-percent`                   | `0`                                               | Percent of the victim's money that goes to the killer                                      |
| `kills.death-penalty`                   | `0`                                               | Money the victim loses (`250` or `"5%"`)                                                   |
| `kills.xp-steal-percent`                | `0`                                               | Percent of the victim's experience the killer gets                                         |
| `kills.rewards`                         | `["[actionbar] <green>+1 kill <gray>({victim})"]` | [Actions](/rnsetups/rncombatpvp/guides/kills-and-rewards.md#reward-actions) for every kill |
| `kills.drops`                           | `NORMAL`                                          | `NORMAL`, `KEEP`, `TRANSFER` or `CLEAR` (only PvP deaths)                                  |
| `kills.loot-protection`                 | `10`                                              | Seconds only the killer can pick up the drops (`0` = off)                                  |
| `kills.head-drop-chance`                | `0`                                               | Percent chance that the victim's head drops                                                |
| `kills.death-recap`                     | `true`                                            | The victim sees who did how much damage                                                    |
| `kills.anti-farm.max-kills` / `minutes` | `3` / `10`                                        | Kills of the same victim that count in that many minutes                                   |
| `kills.anti-farm.same-ip`               | `true`                                            | Kills between players with the same IP give nothing                                        |
| `kills.anti-farm.commands`              | `[]`                                              | Console commands when a player farms. `{player}` = killer, `{victim}`                      |
| `kills.assists.min-percent`             | `25`                                              | Damage percent for an assist                                                               |
| `kills.assists.rewards`                 | `[]`                                              | Actions for assists (`{percent}` works)                                                    |
| `kills.streaks.milestones`              | 5 and 10                                          | Actions when a streak reaches a number                                                     |
| `kills.streaks.ended-at`                | `5`                                               | Smallest streak that counts when someone ends it                                           |
| `kills.streaks.ended`                   | a broadcast                                       | Actions for whoever ends a streak (`{streak}` = the ended streak)                          |
| `kills.rating.enabled`                  | `true`                                            | ELO rating                                                                                 |
| `kills.rating.start`                    | `1000`                                            | Rating of new players                                                                      |
| `kills.rating.k-factor`                 | `32`                                              | How much one fight moves the rating                                                        |

See [Kills and rewards](/rnsetups/rncombatpvp/guides/kills-and-rewards.md).

## Bounties

| Option                      | Default | What it does                                                   |
| --------------------------- | ------- | -------------------------------------------------------------- |
| `bounties.enabled`          | `false` | Players can put bounties (needs Vault). Turn it on to use them |
| `bounties.min`              | `100`   | Smallest amount one player can put                             |
| `bounties.tax-percent`      | `5`     | Percent the server keeps from each bounty placed (up to 90)    |
| `bounties.setter-can-claim` | `false` | Players can claim a bounty they helped to pay                  |
| `bounties.expire-days`      | `7`     | Days before an unclaimed bounty is paid back (`0` = never)     |
| `bounties.broadcast-min`    | `1000`  | Bounties from this total on are told to everyone (`0` = never) |
| `bounties.rewards`          | `[]`    | Actions for the killer when they claim one (`{amount}` works)  |

See [Bounties](/rnsetups/rncombatpvp/guides/bounties.md).

## Sounds

Each sound is `"sound volume pitch"`; `""` turns it off. Players can turn these off for themselves in `/combat`.

| Key                             | When                                                |
| ------------------------------- | --------------------------------------------------- |
| `combat-enter` / `combat-leave` | Combat starts / ends                                |
| `countdown`                     | Each of the last seconds of combat                  |
| `blocked`                       | Something is blocked (a hit, a command, an item...) |
| `kill` / `assist` / `death`     | The killer / a helper / the victim                  |
| `pvp-on` / `pvp-off`            | `/pvp` switched                                     |
| `bounty`                        | A bounty is placed or claimed                       |
| `newbie-end`                    | Newbie protection ends                              |

The sounds of the menus are in `menus.yml`.

## Discord

| Option                 | Default | What it does                                                                           |
| ---------------------- | ------- | -------------------------------------------------------------------------------------- |
| `discord.webhook-url`  | `""`    | A channel webhook (Channel settings > Integrations > Webhooks > Copy URL). `""` = none |
| `discord.combat-log`   | `true`  | Post combat logs                                                                       |
| `discord.streaks-from` | `10`    | Post streak milestones from this streak on                                             |
| `discord.bounties`     | `true`  | Post bounties placed and claimed                                                       |

The messages are under `discord` in the language files.
